alchemy, ssh into router from WAN??? [SOLVED]

Discussion in 'Sveasoft Firmware' started by dakster, Feb 14, 2006.

  1. dakster

    dakster Network Guru Member

    I can't figure out for the life of my why this isnt' working. I have ssh on my router on port 28 (22 forwarding to a box inside my network), which is working great on the LAN. In my Apps&Gaming page, I setup a new port forwarding called routerSSH, forwarding port 28 to 28, TCP, to IP (my router) and enabled it. However, the router isn't allowing any connections to port 28 from the WAN. I port scan it and I can see port 22 open (forwarding to my internal computer), but no 28.

    I'm trying to avoid enabling remote management and https, because I'd like to script some stuff with ssh. I'm trying to use my routers WOL feature to turn on my PC on my network when I'm away, and then ssh into that PC on port 22, but I have to be able to get onto my router from the WAN to run the wol command. I know I can do this through the https remote management, but I prefer the rsa keys, and scriptability of ssh. Anyone know why this simple port forwarding doesn't work??? Thanks a ton in advance!
  2. dakster

    dakster Network Guru Member


    A little more digging and I found it. The Sveasoft docs I was working with said teh port forward would work, but it was wrong. I found this howto that set me straight:

    I had to manually add an iptables entry, and it seems to be working like a charm.
    Since I'm trying to allow ssh into my box on port 28, here's the command:

    /usr/sbin/iptables -I INPUT 1 -p tcp --dport 28 -j logaccept
    nvram set rc_firewall="/usr/sbin/iptables -I INPUT 1 -p tcp --dport 28 -j logaccept"
    nvram commit

    Change the port as needed for your setup. The nvram stuff makes it a permanent change.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice