Welcome to It-Slav.Net blog
Peter Andersson
peter@it-slav.net

I've already got a female to worry about. Her name is the Enterprise.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0

To be able to administrate my OpenWRT router from Internet I need to open the ssh port on the Wan interface.

 

It is real simple, just add to following to /etc/config/firewall:

#open ssh on wan interface
config rule               
        option src              wan
        option dest_port        22
        option target           ACCEPT    
        option proto            tcp 

And restart the firewall:

#/etc/init.d/firewall restart

 


2 Responses to “Open ssh on the WAN inteface in OpenWRT”

  1. Floh1111 Says:

    You saved my day 🙂
    Compiled our new test firmware and was wondering why I can not acces via ssh on wan port 😛

  2. Jim Says:

    I tried that and it works – Thanks
    But what I would like to do is:
    on the Wan side the port should be 1234 and on the lan side it should be 22 i.e. so internally I can still ssh via 22 but over the internet I use port 1234.
    Any idea how to do that?

Leave a Reply

You must be logged in to post a comment.





Book reviews
FreePBX 2.5
Powerful Telephony Solutions






Asterisk 1.6
Build a feature rich telephony system with Asterisk






Learning NAGIOS 3.0





Cacti 0.8 Network Monitoring,
Monitor your network with ease!