iptables and http port(80)
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
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Quoted 10 lines
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
Quoted 7 lines · gonet wireless
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
If trouble isn't in yor web server configuration for that link or <directory> directive, and, as I can see in your rules, you have at least two ethernet devices _eth0_ for output packets and _eth1_ in the input rule, you should indicate the script that IP address against you want connection packets will be head for.
If I am in mistake, please correct me.
Regards
-Miguel Angel Baeyens
KeyID: 0x6FB7A511 en rediris.es