How to change the default 22 SSH port on OpenWRT routers
Posted on 23/06/2006
Here's a simple way to "change" the default SSH port for WAN (the internet) on OpenWRT routers. Let's access SSH from port 23000 for example.
Add the folowing lines to /etc/firewall.user
iptables -A INPUT -i $WAN -p tcp --dport 22 -d 192.168.1.1 -j DROP
# SSH open on port 23000
iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 23000 -j DNAT --to-destination 192.168.1.1:22
iptables -t filter -A input_rule -i $WAN -p TCP --dport 22 -d 192.168.1.1 -j ACCEPT



















![Cheile Gradistei [Mobile upload 2007/12/20 15:40:54]](/images/upload/1/t-1048.jpg)
![Salina Praid [Mobile upload 2007/09/22 04:23:46]](/images/upload/1/t-1047.jpg)
![Transfagarasan [Mobile upload 2007/07/23 06:14:13]](/images/upload/1/t-1031.jpg)
![Balea Lac 2 [Mobile upload 2007/07/23 05:16:33]](/images/upload/1/t-1030.jpg)
![Voineasa [Mobile upload 2007/07/21 12:42:12]](/images/upload/1/t-1029.jpg)
![Omg [Mobile upload 2007/07/20 10:18:23]](/images/upload/1/t-1028.jpg)
![Krka National Park [Mobile upload 2007/06/15 11:02:18]](/images/upload/1/t-1022.jpg)
![Fia Gt3 [Mobile upload 2007/06/01 10:48:18]](/images/upload/1/t-1021.jpg)
![In Drum Spre Bulgaria [Mobile upload 2007/06/01 10:47:26]](/images/upload/1/t-1020.jpg)











