Linux Netfilter discussions
 help / color / mirror / Atom feed
* newbie problem
@ 2003-02-17  7:43 Chris Barnes
  2003-02-17  8:09 ` Joel Newkirk
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chris Barnes @ 2003-02-17  7:43 UTC (permalink / raw)
  To: Netfilter

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

hi people i'm new to the list.

anyway, I have a very simple firewall on a web server. I want to deny
access to everything except the web server (port 80)

i have set the poilcy on all chains to drop and i have added a rule to
the input chain which says

iptables -A INPUT -p tcp --sport 80 -j ACCEPT

i've done it like this because the web server has 2 interfaces (eth0 and
eth1) which i would like to have access to the server (eth0 is local
10.3.2.0/24 and eth1 is external)

i also made a rule for output

iptables -A OUTPUT -p tcp -j ACCEPT

the problem is that nothing can get to the web server...the packets are
being dropped...i checked the counters and none of the rules counted any
packets or bytes so the packets are being dropped before the rules.

what am i doing wrong or what is a better way to do this?

thanks heaps for your help.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: newbie problem
@ 2003-02-17  8:49 Eugene Joubert
  2003-02-17 10:48 ` Chris Barnes
  0 siblings, 1 reply; 9+ messages in thread
From: Eugene Joubert @ 2003-02-17  8:49 UTC (permalink / raw)
  To: 'Chris Barnes', Netfilter

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

Is your webserver on your firewall?

Also your rule for port 80....you're source port is wrong. Remember if I
were to access your webpage on your server I will be coming in with a source
port that my OS has given me. So instead of source port change it to
destination port cause that is were you request is going?

Also I would suggest moving your webserver to another server behind your
firewall.
Just my 5 cents.

PS:
You could also set your OUTPUT Policy to default ACCEPT, but if your really
paranoid then just make it DROP



-----Original Message-----
From: Chris Barnes [mailto:runtimeerror@bigpond.com] 
Sent: 17 02 2003 09:43 AM
To: Netfilter
Subject: newbie problem


hi people i'm new to the list.

anyway, I have a very simple firewall on a web server. I want to deny access
to everything except the web server (port 80)

i have set the poilcy on all chains to drop and i have added a rule to the
input chain which says

iptables -A INPUT -p tcp --sport 80 -j ACCEPT

i've done it like this because the web server has 2 interfaces (eth0 and
eth1) which i would like to have access to the server (eth0 is local
10.3.2.0/24 and eth1 is external)

i also made a rule for output

iptables -A OUTPUT -p tcp -j ACCEPT

the problem is that nothing can get to the web server...the packets are
being dropped...i checked the counters and none of the rules counted any
packets or bytes so the packets are being dropped before the rules.

what am i doing wrong or what is a better way to do this?

thanks heaps for your help.



[-- Attachment #2: Type: text/html, Size: 2511 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-02-20 11:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-17  7:43 newbie problem Chris Barnes
2003-02-17  8:09 ` Joel Newkirk
2003-02-17 10:31   ` Chris Barnes
2003-02-17  8:25 ` Ralf Spenneberg
2003-02-20 11:39   ` Eric Constantineau
2003-02-17  9:00 ` Ralf Spenneberg
     [not found] ` <1045470029.2231.54.camel@kermit.spenneberg.de>
     [not found]   ` <1045477595.21053.2.camel@billybob.back2front.homelinux.org>
2003-02-17 10:27     ` Ralf Spenneberg
  -- strict thread matches above, loose matches on Subject: below --
2003-02-17  8:49 Eugene Joubert
2003-02-17 10:48 ` Chris Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox