OpenWrt Forum Archive

Topic: Port forward with Kamikaze 7.09

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

I'm trying to host a website on one of the computers behind my WRT54GL using Kamikaze 7.09 firmware. I tried forwarding port 80 in the firewall settings but that didn't work. It just goes to the Backend of the router. Meaning it's look at port 80 of the router, not the comp i'm telling it to forward to.

Hi,

have you tried to reach it from the WAN-side?
the port forwarding only works from the wan-side. If you try to connect from inside the lan your packets won´t be forwarded.

Alternatively, you can set hosts in /etc/hosts to force www.google.com (for example) to go to ip 192.168.1.1 (the router) ...

See Common mistakes, item #3.  There must be a better solution to this.

Naww...  accessing the WAN forward from the LAN side now results in timeouts rather than the webif.

This did it, add to /etc/firewall.user:

iptables -t nat -A prerouting_rule  -d x.x.x.x -p tcp --dport 80   -j DNAT --to 192.168.1.100:80
iptables -t nat -A postrouting_rule -s 192.168.1.0/16 -p tcp -d 192.168.1.100 -j MASQUERADE

replace x.x.x.x with your WAN ip.

The discussion might have continued from here.