My linksys wireless router is behind a Linux router and I would like to access the linksys router's admin module remotely.

How do I configure iptables so I can open the admin module?

iptables -t nat -A PREROUTING -p tcp -i $EXT_IF --dport $PORT -j DNAT --to-destination $IP

Am i missing something?

Thanks in advance!

  • 2
    I'd highly recommend not exposing your linksys administrative interface to the Internet. If you want to admin remotely tunnel through over SSH (at the very least) or a IPSEC VPN. – paxos1977 Dec 29 '09 at 6:01
  • @ceretullis - but is it possible? – jrivera Dec 29 '09 at 6:04
  • Yes, it is possible via port forwarding (PAT) or static NAT... probably you want to search for port forwarding with iptables. – paxos1977 Dec 29 '09 at 6:20
  • BTW, the linksys wireless router firmware has to be configured to listen on the WAN interface also ;) You can't do that from your iptables config, you need to modify the wireless router config too. – paxos1977 Dec 29 '09 at 6:22

I'd suggest that you don't try to access the admin services directly from outside: you'll spend time trying some exotic forwarding to get it right and it likely won't be very secure. For my purposes, I usually ssh into a machine inside the router's network and use lynx from there to connect back into the router's admin services. The character interface is a bit rustic, but it works for me. It probably won't work for admin services that want to do fancy-schmancy javascript-based whizzies.

(added later:) For a little fancier work, you can use ssh -X to get Xwindow traffic forwarded to your desktop - this allows you to start your favorite graphical browser (e.g. Firefox) on the target machine to see the admin screens of the router.

  • 1
    I do the same but use ssh tunneling so I can use a graphical browser. You simply tell your ssh client to create a tunnel over the ssh connection, that connects port 1234 on local to linksys:80 on remote (substitute the correct name or ip). Then you point your browser to localhost:1234 and there is your linksys GUI. See ssh.com/support/documentation/online/ssh/adminguide/32/… for more details. I use Putty to do this, so you don't need the CLI client. – Martijn Heemels Dec 29 '09 at 10:20
  • Yep - that works, too. – Shannon Nelson Dec 30 '09 at 0:00

Your Answer

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