SSH into a VPN client router

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
Viper8940
DD-WRT Novice


Joined: 24 Jun 2019
Posts: 3

PostPosted: Mon Jun 24, 2019 16:59    Post subject: SSH into a VPN client router Reply with quote
I recently setup my ddwrt router as a VPN client.

I want to be able to control router settings remotely via ssh.

Not sure if I can do this remotely. If I am at home on my own network It works on lan ip but as soon as I get off my network I am unable to connect via wan ip.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 4342
Location: Netherlands

PostPosted: Mon Jun 24, 2019 18:05    Post subject: Reply with quote
If the VPN client is active you can not connect via the WAN for SSH etc.

The traffic coming in via the WAN is routed out via the VPN and the firewall will not allow that

There are several solutions available

the easiest to set up is Policy Based Routing, just enter the IP addresses you want to route via the VPN in the OVPN PBR field (use CIDR notation)

But there are several drawbacks like DNS leaks

Have a look here:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1129398

and here:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318662

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Viper8940
DD-WRT Novice


Joined: 24 Jun 2019
Posts: 3

PostPosted: Mon Jun 24, 2019 18:16    Post subject: Reply with quote
Thank you so much for your help!

What if I was to make the router a VPN server as well? That would tag you my wan ip I assume. Sorry for all the questions.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 4342
Location: Netherlands

PostPosted: Mon Jun 24, 2019 19:31    Post subject: Reply with quote
You can make the router an OVPN server and an OVPN client simultaneously but you also need something like PBR.

In my signature (bottom of the post) is an OVPN server setup guide there is a chapter about running a server and client on the same router

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum