0

I'm looking for help to configure my Synology. I can't ssh it from outside when the VPN is connected. Everything is fine when deconnected. I'm using openvpn with privateinternetaccess.

I want to connect using my ISP IP, not the VPN IP address. For now, I think if I connect to ISP:22, all packets are going back through the VPN.

How to change that ? Is it a iptables or routing config ?

Thanks !

1 Answer 1

1

It is most probably because once you open openvpn the default route is set to the VPN link and then as you suspect all the traffic is redirected there and not just the one for the VPN.

Check the output of the "route -n" command and if you see something like:

0.0.0.0         192.168.1.10       0.0.0.0         UG    0      0        0 tun0

(where 192.168.1.10 is the VPN gateway and tun0 the device) then you are having default route there.

To solve it you must just not put the default route on openvpn. Usually this is pushed by the server but you can ignore it adding a

route-noexec
route-nopull

To the client configuration file.

3
  • I have added those to lines, and I can connect from outside, great :) But now my IP address I see on internet is my ISP address, not VPN IP. Does it mean that I'm not "protected" from the VPN ?
    – Rodolphe
    Mar 17, 2014 at 13:39
  • You have "two" IPs: for the "internet" you have the one from the ISP, while in the VPN context (for the other machines in the VPN) you have the VPN one (and you exit with that one when you access VPN machines). You practically have two network connections (one for VPN and one for "the rest") with their specific IP adresses.(you could have also more than two of course)
    – fede.evol
    Mar 17, 2014 at 13:42
  • I have only one machine, a NAS, connected to privateinternetaccess. In fact, I wanted all trafic to go through the VPN. Except for one thing, all incoming trafic on my ISP IP. Is there a way to send back all trafic to eth0, not tun0 when incoming trafic is eth0 ?
    – Rodolphe
    Mar 17, 2014 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .