Ubuntu machine running haproxy with 2 network cards, 1 connected to WAN (called wan0) and another connected to LAN (called lan0). All chains set to DROP traffic.
# Masquerade traffic from LAN to WAN
-A POSTROUTING -o wan0 -s 192.168.x.x/24 -j MASQUERADE
# Allow traffic from LAN to WAN
iptables -I FORWARD -i lan0 -o wan0 -j ACCEPT
# Allow HTTP traffic in/out both interfaces
-A INPUT -p tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp --sport 80 -j ACCEPT
*** Is below rule needed? ***
# -A FORWARD -i wan0 -o lan0 -p tcp –dport 80 -j ACCEPT
I want to allow HTTP (port 80) traffic from WAN into the LAN where haproxy will route it to backend servers. Documentation I've read states:
"INPUT, FORWARD, and OUTPUT are separate. A packet will only hit one of the three chains."
Am I missing any iptable rules that would route HTTP (port 80) traffic between interfaces?