Jump to content
  • 0

ubuntu openvpn connection establishes but unreachable on local IP

Rate this question




i have followed the guide on how to configure ubuntu linux in command line to connect through openvpn. "on torguard"


This is a headless server and i make all changes through ssh.


once the tunnel is up "runs with no issues" if i try to reach the machine via local IP... cant connect, also other service that runs a webserver same thing.




any help appreciated



Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

With openvpn you must specify static routing for a particular port. 

Make a backup first! 

In Linux (using sudo):

iptables-save > rules.txt

iptables -A INPUT -d x.x.x.x -p tcp --dport 22 -j ACCEPT

iptables -A INPUT -d x.x.x.x -j DROP

Start over with:

iptables-restore rules.txt

Where x. X. X. X is your LAN IP with port forwarding enabled on your gateway


For wireguard you must specify the name space. 



Does that help? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...