ros
10-09-2009, 09:17
Prerequisites:
You have set your web server to run on port 81.
First move WebGUI (Asus administration interface) to some other port, for example 8080:
nvram set http_lanport=8080
nvram commit && reboot
Now edit /usr/local/sbin/post-firewall
and add following rule:
iptables -i ppp0 -t nat -I PREROUTING -m tcp -p tcp --dport 80 -j DNAT --to-destination 192.168.1.254:81
where ppp0 is your WAN interface (can be also vlan1)
and
192.168.1.254 is your router local IP.
EDIT - perhaps moving WebGUI to port 8080 is not even required. Just access web server from lan at port 81 and from WAN at 80. Haven't tested.
You have set your web server to run on port 81.
First move WebGUI (Asus administration interface) to some other port, for example 8080:
nvram set http_lanport=8080
nvram commit && reboot
Now edit /usr/local/sbin/post-firewall
and add following rule:
iptables -i ppp0 -t nat -I PREROUTING -m tcp -p tcp --dport 80 -j DNAT --to-destination 192.168.1.254:81
where ppp0 is your WAN interface (can be also vlan1)
and
192.168.1.254 is your router local IP.
EDIT - perhaps moving WebGUI to port 8080 is not even required. Just access web server from lan at port 81 and from WAN at 80. Haven't tested.