I have a linux server with these following iptable rules:
iptables -p INPUT DROP
iptables -p OUTPUT DROP
iptables -p FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport http -j ACCEPT
I have apache2 listening on port 80. The problem is that while the local machine can access the dev machine by host name, none of the other local machines can access it. If I clear the iptable rules, they can access it.
How do I fix it? I tried adding port 80 to the above ruleset, but it didn't work.
Edit, here are the current iptable rules:
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport http -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport 53 -j ACCEPT
iptables -A OUTPUT -t filter -p udp --dport 53 -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport https -j ACCEPT
iptables -A OUTPUT -t filter -p udp --dport https -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport 445 -j ACCEPT
iptables -A OUTPUT -t filter -p tcp --dport 139 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport domain -i eth0 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport http -j ACCEPT