Add route to Linux system to allow a VPN connection access the System which is behind a VPN ;)

Okay machine ‘I am behind a VPN’ can be accessed locally: 10.1.1.20, with OpenVPN it is behind an external IP address, not mine
I set up a VPN to my local network: 10.10.10.50 is my IP when I am behind a VPN, when I try to access 10.1.1.20 it is not allowed, where other machines in the same network are ok.
This is due to the OpenVPN connection being active (when disabling OpenVPN, than all is ok), so trying to be able to allow the remote VPN access the machine.

Now I did 2 things and I believe the first command did it.

1. used a new route:
ip route add 10.10.10.0/24 (VPN) via 10.1.1.100 (router) dev eth0

and I used
2. iptables -A INPUT -s 10.10.10.50 -j ACCEPT (but this one did not work, but I will mention it .. you never know)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.