Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I seem to be having some issues with my dd-wrt router and port forwarding. It seems like it should be clear as day - just put map the incoming port to the destination port and specify the IP. I picked a port number > 2000 and mapped it to 22 for ssh.

Seems like when I try to access my machine on the LAN it works flawlessly, but when I try to access via WAN, it timeouts. Also, if I try to access it with an incorrect port via WAN, it refuses which is expected. However, I'm puzzled what could be causing the timeout.

I tried "ssh -vvv" as well as traceroute, but those don't tell me very much. What can I try to debug this issue?

EDIT: Also, I just wanted to add that I tried rebooting the router, specifying different ports to use, and temporarily disabling the firewall. Nothing seems to be changing the issue.

EDIT2: Just found out it was my router having problems with using my own IP and NAT. I found out everything works if I ssh outside to another server, and then back in to my own.

share|improve this question
Do a nmap -p 2022 <your WAN IP>. Also do you have shell access to the router? Then we can look directly at the iptables rules. – BubuIIC Jan 12 '13 at 22:20
up vote 0 down vote accepted

Do an external port scan and make sure the port is actually open. Also, instead of mapping a random port to the actual port just map 22 to your server - one less step in the routing process.

As a final note, if your modem is actually a modem/router these problems always crop up if you have another device behind it handling the routing and port forwarding.

share|improve this answer
Actually not using port 22 is a really good idea from a security perspective. Also, there is no additional step, it's just a different port that gets forwarded. – BubuIIC Jan 12 '13 at 22:17
Thanks, but I tried mapping 22 to 22 for my IP and that still presents the same problem. I just did an external port scan, and the port is open... – Chris Harris Jan 12 '13 at 22:18
Okay, do the external port scan. When you say that your trying to access from the WAN, are you talking about connecting to your external IP from your local network? Accessing local resources from the inside using your outside address rarely works. – Scandalist Jan 12 '13 at 22:25

You must log in to answer this question.

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