OpenWrt Forum Archive

Topic: Firewall configuration question

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

Hi Guys,

I am not very good at iptables, so maybe someone can help.  I would like to have the system forward any requests to its WAN IP address coming from within the lan to the appropriate server.  Example:

server1 has ip 192.168.100.9
Public IP is 66.66.66.66 (example)

server1 hosts an apache server hosting "somedomainname.com"

If I use a workstation (ip 192.168.100.20) to go to http://somedomainname.com, which resolves to my public ip, I get a "Cant establish connection to server...."

Is there any way to trick the router into redirecting traffic going from the LAN to its public ip, making it look like its coming from the outside and not internally?

I know its possible, but just dont know what the appropriate ip tables rule should look like.


Any help is appreciated.

Thanks.

Thanks that helps a lot. I did a search but I think i put in the wrong terms.

The discussion might have continued from here.