RE: iptables and http port(80)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hello world,
> I have a link on my web server router linux mandrake 8.2
> which shows nothing(white page) inside and outside of my
> network. I add INPUT( -A INPUT -i eth1 -p tcp -m tcp
> --dport 80 -j ACCEPT) rule in my firewall(iptables 1.2.5)
> and now i can browse this link inside my network but none
> outside. I add OUTPUT( -A OUTPUT -o eth0 -p tcp -m tcp
> --dport 80 -j ACCEPT)  rule but I'm not able to browse this
> link outside my network. I don't catch what's wrong
> Any help will be more appreciated

The INPUT chain is for incoming packets.
The OUTPUT chain is for outgoing packets, and is not refering to the
external network card.

Since the webserver can reply to your clients, I assume the you have a
default policy of ACCEPT for the OUTPUT chain (iptables -P OUTPUT
ACCEPT) so you don't have to use any rule there.

I guess your LAN is connected to eth1 and internet to eth0.
To accept http traffic for your LAN and internet :
# iptables -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT

If you have only 2 network cards (disregarding lo), you can a rule
like this :
# iptables -A INPUT -p tcp --dport 80 -j ACCEPT


Rob



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux