Introduction:
In today’s interconnected world, the ability to access devices and services remotely has become increasingly valuable. Whether it’s monitoring your home security system or controlling your smart appliances, having remote access can greatly enhance convenience and efficiency. However, achieving this while maintaining security can be a challenge. Fortunately, with the right tools and techniques, you can safely and effectively enable port forwarding from your local IP to a public IP using OpenVPN and Portmap.io.
What is Port Forwarding?
Port forwarding is a networking technique that allows incoming traffic to reach a specific device or service within a private local network from the internet. It’s like opening a door in your router’s firewall to let certain types of data through. This is particularly useful for hosting services such as web servers, game servers, or remote desktop connections.
Introducing OpenVPN and Portmap.io
OpenVPN is a popular open-source software that creates secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It provides a secure tunnel for data transmission over the internet, ensuring privacy and integrity.
Portmap.io is a convenient tool that simplifies the process of port forwarding by providing a public IP address and port mapping service. It allows you to expose services running on your local network to the internet without the need to configure complex router settings.
Install OpenVPN Connect:
Begin by downloading and installing the OpenVPN Connect software on your device. This software will be used to establish a secure connection to your local network.
Configure Port Forwarding on Portmap.io
- Sign up and Log in: Begin by signing up for an account on Portmap.io and logging in.
- Create Configuration:
- Navigate to the Configuration page on Portmap.io.
- Create a new configuration with the following details:
- Name: Choose a name for your configuration.
- Type: Select
OpenVPN
.
- Protocol: Choose
tcp
.
- Once configured, your settings should resemble the screenshot below:
- Download .ovpn File:
- After configuring port forwarding on Portmap.io, download the corresponding
.ovpn
file by clicking on the Download button. This file contains the necessary configuration settings for connecting to your local network via OpenVPN.
- After configuring port forwarding on Portmap.io, download the corresponding
- Create Mapping Rule:
- Navigate to the MAPPING RULES page on Portmap.io.
- Create a new mapping rule with the following details:
- Configuration: Select the configuration you created earlier (e.g., Node-RED).
- Protocol: Choose tcp.
- Hostname: Leave this unchanged.
- Port on Portmap.io: Specify the port through which you want to connect to your local Node-RED service. So, whatever services running on port 1880 on my localhost can be accessed via port 41712 in this case; and so, 41712 is your public port as we will need it later.
- Your mapping rule settings should resemble the screenshots below:
- Completion:
- Once you’ve completed the above steps, you’ve successfully configured port forwarding for your OpenVPN connection using Portmap.io.
Establish VPN Connection using OpenVPN:
Import .ovpn File:
- Open the OpenVPN Connect Application and navigate to the Upload File tab.
- Import the .ovpn file downloaded earlier. After importing, the interface should resemble the screenshot below.
- Click on the Connect button within the OpenVPN Connect interface to establish the VPN connection. Upon successful connection, your public IP address will be displayed in the Profile section as shown below.
Verify Port Forwarding:
- Now that you’re connected to the OpenVPN profile and your local port 1880 is forwarded to port 41712 on IP 193.161.193.99, let’s verify if the port is open. Ensure that your Node-RED is running on your local system.
- Open a web browser and navigate to https://www.yougetsignal.com/tools/open-ports/.
- Enter the following details:
- IP: 193.161.193.99
- Port: 41712
- The result should indicate that port 41712 is open on IP 193.161.193.99, as shown below.
Example: Making Node-RED Dashboard Publicly Availabl:
As an example, let’s say you want to make your Node-RED Dashboard publicly available. Follow these steps:
- Access your Node-RED Dashboard using the public IP 193.161.193.99 address and port(41712) provided by Portmap.io.
Conclusion:
Port forwarding from a local IP to a public IP using OpenVPN and Portmap.io offers a secure and convenient way to access services remotely. By leveraging the power of these tools, you can unlock the full potential of your local network without compromising security. Whether you’re monitoring IoT devices, hosting a personal website, or accessing a home media server, port forwarding opens up a world of possibilities for remote connectivity. So why wait? Get started today and take control of your network like never before.