NTAdmin
12-10-2005, 10:12
Hi,
I have set up a thttpd server on port 81 and I can access it from lan fine, but no matter what I do with my post-firewall script I cannot make it accessible from wan, here is my post-firewall:
[root@asus root]$ cat ../sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT
--to-destination $4:81
iptables -A INPUT -j DROP
Can anyone comment on what';s wrong here please
I have set up a thttpd server on port 81 and I can access it from lan fine, but no matter what I do with my post-firewall script I cannot make it accessible from wan, here is my post-firewall:
[root@asus root]$ cat ../sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT
--to-destination $4:81
iptables -A INPUT -j DROP
Can anyone comment on what';s wrong here please