SSH tunnel - Wan disabled - DDWRT behind another router

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


Joined: 28 Aug 2011
Posts: 19

PostPosted: Wed Aug 10, 2016 17:42    Post subject: SSH tunnel - Wan disabled - DDWRT behind another router Reply with quote
My DDWRT is behind another router and I am having trouble setting it up as a ssh server for external access (remote putty access for tunneling).

In fact, I managed to make it work, but only with this configuration:

INTERNET
|
ROUTER1 (internet IP/192.168.0.1) (port 22 fowarded to 192.168.0.2)
| (lan port - wan port)
DDWRT (192.168.0.2/10.0.0.1) (dhcp enabled, ssh listening on port 22)
|
CLIENTS (10.0.0.X)

It works fine and I can connect via SSH to my DDWRT from work and bypass some stupid proxy restrictions. But the problem is that I need DDWRT clients to be in the same local net as router1. Something like the configuration below. But when I do it, I no longer can access the ssh server (DDWRT) remotely.

INTERNET
|
ROUTER1 (internet IP/192.168.0.1) (port 22 fowarded to 192.168.0.2)
| (lan port - lan port)
DDWRT (WAN DISABLED/192.168.0.2) (dhcp disabled, ssh listening on port 22)
|
CLIENTS (192.168.0.X)

Any help?? (router1 acts also as a Modem, therefore I can't replace it or install DDWRT on it)
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Wed Aug 10, 2016 20:58    Post subject: Reply with quote
You can set router 1 in bridge mode and get the public ip on the dd-wrt router.
ldmelo
DD-WRT Novice


Joined: 28 Aug 2011
Posts: 19

PostPosted: Thu Aug 11, 2016 12:08    Post subject: Reply with quote
Thank you for the replay, Per Yngve Berg.

Problem with bridge mode is that there are other clients connected to router1. That is in fact the reason I am trying to change the configuration of the network... I need all the clients from router1 and ddwrt to be on the same network, so they can communicate and access each other.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu Aug 11, 2016 15:05    Post subject: Reply with quote
The issue is that the vpn router is not the gateway for clients. You have to enter a static route on router 1.
ldmelo
DD-WRT Novice


Joined: 28 Aug 2011
Posts: 19

PostPosted: Fri Aug 12, 2016 11:29    Post subject: Reply with quote
I feel stupid. It was just a bad configuration of the ssh server on DDWRT.

I had the right ssh port on the tab "Administration" but it turns out that there is another setting for the ssh port on the tab "Services", and I had overlooked that one, which is just the port for local access...

Now the tunnel is working fine. No need to mess with router1, only a simple port forward to 192.168.0.2.

Thanks!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT 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