networking - Using SSH when behind VPN - Ask Ubuntu


i have server (192.168.1.1) use router/default gateway. server connects openvpn , routes network through vpn before sending (encrypted) modem (192.168.1.254). have configured port forwarding ssh connections on public ip routed server. ip vpn can't used connect server.

whenever disconnect vpn can access server ssh remote location when routing through vpn impossible. seems logical server tries reply different ip.

what wish want server keeps routing lan traffic through vpn accepts ssh on public ip. if routing traffic modem server , modem again. specify rules on server allow ssh connections. perhaps better option ssh (22) gets routed through modem. problem can't routing modem server , again work.

what tried:

i found this source suggest following:

ip rule add 192.168.1.1 table 128 ip route add table 128 192.168.1.0 dev eth0 ip route add table 128 default via 192.168.1.254 

which feels undoing previous vpn routing have done before. whenever can still acces server remote location vpn won't work anymore.

i have solution not want perhaps people out. @ least able access server remote location while behind vpn.

what set reverse ssh tunnel server not behind vpn or use service provides tunnels such openport. these services easy set won't allow use own ip (and port) connect.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User