likeapear
07-06-2006, 11:50
Hello, I'm running THTTPD server (port 81) on my wl-500g. I need to access this server from WAN (internet). My ISP mapped port 1199 to my wl-500g router.
My post-firewall script is here:
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 1199 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 1199 -j DNAT --to-destination $4:81
iptables -A INPUT -j DROP
But it does'nt work from WAN (from LAN it is very well). What to do? Thanks!
My post-firewall script is here:
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 1199 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 1199 -j DNAT --to-destination $4:81
iptables -A INPUT -j DROP
But it does'nt work from WAN (from LAN it is very well). What to do? Thanks!