OpenWrt Forum Archive

Topic: Serving all HTTP traffic

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

Hi all,

Is it possible to configure OpenWRT to serve all HTTP traffic.

I want to run a web server on my router, in which all HTTP traffic through the router gets directed to the web server. Is this possible?

Thank you

Try this command:
iptables -t nat -A PREROUTING -i br-lan -p tcp -m tcp --dport 80 -j DNAT --to-destination <routerip>:<routerport>

You need to read about netfilter, in this case you require a port forward for the used port.

The discussion might have continued from here.