Report this

What is the reason for this report?

need to open port on openvpn access server

Posted on May 23, 2022

i add openvpn access server to droplet ,i need to open port like 1817 and then forword to client vpn port to connect with service on home pc over internet such as portmap.io work i need to make rules maps and connect to the service on my home pc in every where by internet



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

To achieve what you’re looking for, follow these steps:

  1. Open the required port 1817 on your OpenVPN Access Server’s firewall.

  2. Configure OpenVPN to forward the traffic coming from clients to the specified port on your home PC.

  3. To open the port, use UFW (assuming you’re using Ubuntu or similar) with the following command:

  1. sudo ufw allow 1817
  1. To configure the port forwarding on OpenVPN, edit the server.conf file on the access server:
  1. sudo nano /etc/openvpn/server/server.conf

Add the following line, replacing YOUR_HOME_PC_IP and YOUR_HOME_PC_PORT with the appropriate values:

push route YOUR_HOME_PC_IP 255.255.255.255 port YOUR_HOME_PC_PORT

Save the changes and restart the OpenVPN service:

  1. sudo systemctl restart openvpn

Now, with the VPN connected, you should have access to the service on your home PC.

For more information about OpenVPN and port forwarding, check out How To Set Up and Configure an OpenVPN Server on Ubuntu 22.04.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.