You are not logged in.

#1 2008-02-12 16:29:13

eldamar
Member
From: Sweden
Registered: 2008-02-11
Posts: 104

iptables with webserver

i want to open the port 80 in iptables for eth0 but not eth1, how do i go about doing that..
im currently using iptables for routering.

nevermind i seem to have fix my problem..

# iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
# /etc/rc.d/iptables save

did the trick big_smile

Last edited by eldamar (2008-02-12 16:50:23)

Offline

#2 2008-02-12 16:38:24

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: iptables with webserver

Offline

#3 2008-02-12 16:41:35

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: iptables with webserver

Given your question I assume that you have iptables running and configured a firewall. Because your question is rather generic I'd answer you have to allow connections to port 80 on the nic your webserver is listening by adding the the right iptables rules to the INPUT chain in your firewall script. For a better answer it would help if you'd post your firewall setup.

Edit: I forgot about the wiki ...

Last edited by chimeric (2008-02-12 16:42:20)

Offline

#4 2008-02-12 18:50:52

VikM
Member
Registered: 2007-11-10
Posts: 50

Re: iptables with webserver

You should add

-i eth0

to the rule to allow only for eth0.

A good link http://iptables-tutorial.frozentux.net/

Last edited by VikM (2008-02-12 18:53:46)

Offline

#5 2008-02-14 15:20:34

eldamar
Member
From: Sweden
Registered: 2008-02-11
Posts: 104

Re: iptables with webserver

thanks for the help!

Offline

Board footer

Powered by FluxBB