OpenWrt Forum Archive

Topic: wan2server

The content of this topic has been archived on 13 Jan 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Whatever I do I can not forward port 80 from wan to my server behind wl-500gp with openwrt.  I have tried those examples in /etc/firewall.conf. Ive tried to add ip and hostname to hosts.conf and mac with ip-add to ethers. Why arent there any howto's on this subject. I've seen a lot of posts when googling aroun about people who dont now howto do this. All answers where add: iptables -P portforwaring... as described in firewall.conf but it just dosnt work.

vpn is not an alternative. Am i missing something.

Please someone do a howto and tell me if there are any dependencies that i need to install.

Im been trying to get my server on the wan side for about 4 weeks now without any success. Lan side is no problem.

(Last edited by orso on 20 Oct 2007, 22:49)

iptables -t nat -A prerouting_wan -p tcp --dport 80 -j DNAT --to 192.168.2.100
iptables        -A forwarding_wan -p tcp --dport 80 -d 192.168.2.100 -j ACCEPT

will forward port 80 to 192.168.2.100. Either execute the commands on command line or write them into /etc/firewall.user and run /etc/init.d/firewall restart. You can check if it's working with http://www.canyouseeme.org/. Make sure a service is listening on 192.168.2.100:80 otherwise canyouseeme will not show the port as opened.

The discussion might have continued from here.