Server Fault is a question and answer site for system and network administrators. 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

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!

share|improve this question
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.

share|improve this answer
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… 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 posting your answer, you agree to the privacy policy and terms of service.