Environment :linksys wrt300n v1.1 which can have ddwrt-mega. Willing to tunnel all lan's outbound traffic through an ssh tunnel.

  • 1
    Not programming related. Perhaps try on SuperUsers. – pst Jul 25 '12 at 0:12

You can tunnel a specific port with a reverse shell. The direction is important. For example ssh -R 80:localhost:80 user@www.host.de. This will connect your localhost port 80 to the port 80 from the host and it will send all network packets from port 80 to your port 80. When you need you can do the other way around.


To tunnel all outbound LAN traffic, follow these steps:

  1. Run script in the form ssh -D <localport> <remotehost>. E.g. ssh -D 8080 ssh-user@server-ip. Here, 8080 is source port on which SOCKS server listens. It'll perform Dynamic Port Forwarding.

  2. Setup a proxy from GUI of router. The proxy server detail: IP is local/private IP of router (where script of step 1 runs) and port is the port specified in script of step 1.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.