* comments about lokkit default script
@ 2003-09-11 15:10 Faheem Mitha
0 siblings, 0 replies; 7+ messages in thread
From: Faheem Mitha @ 2003-09-11 15:10 UTC (permalink / raw)
To: netfilter
Dear People,
I'm pretty new to packet filtering etc. I ran lokkit's simple
configuration utility, and it seems to work Ok with my computer. I don't
think I need an elaborate setup. I'm running my machine on Earthlink's
cable broadband (pretty basic setup) using DHCP, and am currently
disallowing all connections from outside, though I might open up an
ssh port at some point. The script is run as
/sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
FORWARD -j RH-Lokkit-0-50-INPUT
in /etc/rc*, where the chain is defined (/in /etc/default/lokkit) by
#!/bin/sh
PATH=/sbin:$PATH
iptables -N RH-Lokkit-0-50-INPUT
iptables -F RH-Lokkit-0-50-INPUT
iptables -A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.185
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.186
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.187
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --syn -j REJECT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT
At the moment, I just trying to understand what this chain does.
From reading documentation, I see that the line
/sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
FORWARD -j RH-Lokkit-0-50-INPUT
basically disallows new connections, but I got the impression that
this is not considered the best way to do this, as it is still
possible to make connections by using "malformed packets". Is this
still a good first approximation?
I can't get any information about ports using nmap, presumably because
it uses orthodox connection methods. Ping is still working, presumably
because I have not disallowed ICMP packets.
Are the lines
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.18*
--sport 53 -d 0/0 -j ACCEPT
allowing through the DHCP connection? The 207.69.188.18* are
Earthlink servers, they look like nameservers.
Thanks in advance for any reply.
Faheem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* comments about lokkit default script
@ 2003-09-12 6:11 Faheem Mitha
2003-09-12 8:02 ` Gavin Hamill
2003-09-12 18:38 ` Stephen Smoogen
0 siblings, 2 replies; 7+ messages in thread
From: Faheem Mitha @ 2003-09-12 6:11 UTC (permalink / raw)
To: netfilter
Dear People,
I'm pretty new to packet filtering etc. I ran lokkit's simple
configuration utility, and it seems to work Ok with my computer. I don't
think I need an elaborate setup. I'm running my machine on Earthlink's
cable broadband (pretty basic setup) using DHCP, and am currently
disallowing all connections from outside, though I might open up an
ssh port at some point. The script is run as
/sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
FORWARD -j RH-Lokkit-0-50-INPUT
in /etc/rc*, where the chain is defined (/in /etc/default/lokkit) by
#!/bin/sh
PATH=/sbin:$PATH
iptables -N RH-Lokkit-0-50-INPUT
iptables -F RH-Lokkit-0-50-INPUT
iptables -A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.185
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.186
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.187
--sport 53 -d 0/0 -j ACCEPT
iptables -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --syn -j REJECT
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT
At the moment, I just trying to understand what this chain does.
From reading documentation, I see that the line
/sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
FORWARD -j RH-Lokkit-0-50-INPUT
basically disallows new connections, but I got the impression that
this is not considered the best way to do this, as it is still
possible to make connections by using "malformed packets". Is this
still a good first approximation?
I can't get any information about ports using nmap, presumably because
it uses orthodox connection methods. Ping is still working, presumably
because I have not disallowed ICMP packets.
Are the lines
iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.18*
--sport 53 -d 0/0 -j ACCEPT
allowing through the DHCP connection? The 207.69.188.18* are
Earthlink servers, they look like nameservers.
Thanks in advance for any reply.
Faheem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comments about lokkit default script
2003-09-12 6:11 comments about lokkit default script Faheem Mitha
@ 2003-09-12 8:02 ` Gavin Hamill
2003-09-12 17:26 ` Faheem Mitha
2003-09-12 18:38 ` Stephen Smoogen
1 sibling, 1 reply; 7+ messages in thread
From: Gavin Hamill @ 2003-09-12 8:02 UTC (permalink / raw)
To: netfilter
On Friday 12 September 2003 07:11, Faheem Mitha wrote:
> Dear People,
>
> Are the lines
>
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.18*
> --sport 53 -d 0/0 -j ACCEPT
>
> allowing through the DHCP connection? The 207.69.188.18* are
> Earthlink servers, they look like nameservers.
Your second hunch is right - they are for Eathlink's nameservers, since that's
what will be defined in /etc/resolv.conf... DNS lookups reply using a UDP
source port of 53, hence the lines added by lokkit..
I would be wary of the fact that DHCP (which uses UDP ports 67 and 68) is
currently blocked, so if you start to get connection problems in the near
future, you'll know why - you should probably see messages from your DHCP
client that it was unable to renew the lease...
iptables -A INPUT -p UDP -i eth0 --dport 67 --sport 68 -j ACCEPT
is what I use to ensure that the DHCP traffic is permitted from the outside
world.
Cheers,
Gavin.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comments about lokkit default script
2003-09-12 8:02 ` Gavin Hamill
@ 2003-09-12 17:26 ` Faheem Mitha
0 siblings, 0 replies; 7+ messages in thread
From: Faheem Mitha @ 2003-09-12 17:26 UTC (permalink / raw)
To: Gavin Hamill; +Cc: netfilter
On Fri, 12 Sep 2003, Gavin Hamill wrote:
> On Friday 12 September 2003 07:11, Faheem Mitha wrote:
> > Dear People,
> >
> > Are the lines
> >
> > iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.18*
> > --sport 53 -d 0/0 -j ACCEPT
> >
> > allowing through the DHCP connection? The 207.69.188.18* are
> > Earthlink servers, they look like nameservers.
>
> Your second hunch is right - they are for Eathlink's nameservers, since that's
> what will be defined in /etc/resolv.conf... DNS lookups reply using a UDP
> source port of 53, hence the lines added by lokkit..
>
> I would be wary of the fact that DHCP (which uses UDP ports 67 and 68) is
> currently blocked, so if you start to get connection problems in the near
> future, you'll know why - you should probably see messages from your DHCP
> client that it was unable to renew the lease...
>
> iptables -A INPUT -p UDP -i eth0 --dport 67 --sport 68 -j ACCEPT
>
> is what I use to ensure that the DHCP traffic is permitted from the outside
> world.
Hi. Thanks for the info. Does the rest of the configuration look Ok then?
Faheem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comments about lokkit default script
2003-09-12 6:11 comments about lokkit default script Faheem Mitha
2003-09-12 8:02 ` Gavin Hamill
@ 2003-09-12 18:38 ` Stephen Smoogen
2003-09-12 19:01 ` Faheem Mitha
1 sibling, 1 reply; 7+ messages in thread
From: Stephen Smoogen @ 2003-09-12 18:38 UTC (permalink / raw)
To: Faheem Mitha; +Cc: netfilter
Basically to understand the script a bit better you should look at how
the rules look in the table.
iptables -nxvL
should give you some output. If the default policies are to ACCEPT
things then what is happening is that you are accepting ALL outbound
traffic and very little inbound traffic. The newest
redhat-config-firewall in their rawhide has some changes to this, but I
have been doing custom firewalls for too long now to remember what they
are (I think they put in an ESTABLISHED,RELATED rule in now.)
Are you forwarding traffic through your firewall or just using it as a
client. If you are using it as a client it is pretty ok and secure. If
you are using it as a forwarder you will probably want to make some
changes for interfaces to be semi-trusted.
On Fri, 2003-09-12 at 00:11, Faheem Mitha wrote:
> Dear People,
>
> I'm pretty new to packet filtering etc. I ran lokkit's simple
> configuration utility, and it seems to work Ok with my computer. I don't
> think I need an elaborate setup. I'm running my machine on Earthlink's
> cable broadband (pretty basic setup) using DHCP, and am currently
> disallowing all connections from outside, though I might open up an
> ssh port at some point. The script is run as
>
> /sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
> FORWARD -j RH-Lokkit-0-50-INPUT
>
> in /etc/rc*, where the chain is defined (/in /etc/default/lokkit) by
>
> #!/bin/sh
> PATH=/sbin:$PATH
> iptables -N RH-Lokkit-0-50-INPUT
> iptables -F RH-Lokkit-0-50-INPUT
> iptables -A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.185
> --sport 53 -d 0/0 -j ACCEPT
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.186
> --sport 53 -d 0/0 -j ACCEPT
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.187
> --sport 53 -d 0/0 -j ACCEPT
> iptables -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --syn -j REJECT
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT
>
> At the moment, I just trying to understand what this chain does.
>
> >From reading documentation, I see that the line
>
> /sbin/iptables -I INPUT -j RH-Lokkit-0-50-INPUT && /sbin/iptables -I
> FORWARD -j RH-Lokkit-0-50-INPUT
>
> basically disallows new connections, but I got the impression that
> this is not considered the best way to do this, as it is still
> possible to make connections by using "malformed packets". Is this
> still a good first approximation?
>
> I can't get any information about ports using nmap, presumably because
> it uses orthodox connection methods. Ping is still working, presumably
> because I have not disallowed ICMP packets.
>
> Are the lines
>
> iptables -A RH-Lokkit-0-50-INPUT -p udp -m udp -s 207.69.188.18*
> --sport 53 -d 0/0 -j ACCEPT
>
> allowing through the DHCP connection? The 207.69.188.18* are
> Earthlink servers, they look like nameservers.
>
> Thanks in advance for any reply.
> Faheem.
--
Stephen John Smoogen smoogen@lanl.gov
Los Alamos National Labrador CCN-5 Sched 5/40 PH: 4-0645 (note new #)
Ta-03 SM-1498 MailStop B255 DP 10S Los Alamos, NM 87545
-- So shines a good deed in a weary world. = Willy Wonka --
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comments about lokkit default script
2003-09-12 18:38 ` Stephen Smoogen
@ 2003-09-12 19:01 ` Faheem Mitha
2003-09-12 19:36 ` Stephen Smoogen
0 siblings, 1 reply; 7+ messages in thread
From: Faheem Mitha @ 2003-09-12 19:01 UTC (permalink / raw)
To: Stephen Smoogen; +Cc: netfilter
On Fri, 12 Sep 2003, Stephen Smoogen wrote:
>
> Basically to understand the script a bit better you should look at how
> the rules look in the table.
>
> iptables -nxvL
>
> should give you some output. If the default policies are to ACCEPT
> things then what is happening is that you are accepting ALL outbound
> traffic and very little inbound traffic. The newest
> redhat-config-firewall in their rawhide has some changes to this, but I
> have been doing custom firewalls for too long now to remember what they
> are (I think they put in an ESTABLISHED,RELATED rule in now.)
>
> Are you forwarding traffic through your firewall or just using it as a
> client. If you are using it as a client it is pretty ok and secure. If
> you are using it as a forwarder you will probably want to make some
> changes for interfaces to be semi-trusted.
I'm not sure what this means. The firewall is set up on my home computer's
kernel, which is also the only computer I have, no LAN (I think they call
it). As I understand it, all packets coming and going from my computer
pass through this firewall. I don't think I am doing any forwarding. Is
this done for other computers connected to the net through the firewall?
Faheem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comments about lokkit default script
2003-09-12 19:01 ` Faheem Mitha
@ 2003-09-12 19:36 ` Stephen Smoogen
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Smoogen @ 2003-09-12 19:36 UTC (permalink / raw)
To: Faheem Mitha; +Cc: netfilter
Yes.. sorry I went too fast. If you had multiple computers sitting
behind the computer running iptables then the forward rule is used (EG
something like this:
[Computer 1] <->[switch]->[Netfilter Computer]<->[Earthlink]
[Computer 2] <-----^
In your case the rules below are secure.
[Netfilter computer] <-> [Earthlink]
On Fri, 2003-09-12 at 13:01, Faheem Mitha wrote:
> On Fri, 12 Sep 2003, Stephen Smoogen wrote:
>
> >
> > Basically to understand the script a bit better you should look at how
> > the rules look in the table.
> >
> > iptables -nxvL
> >
> > should give you some output. If the default policies are to ACCEPT
> > things then what is happening is that you are accepting ALL outbound
> > traffic and very little inbound traffic. The newest
> > redhat-config-firewall in their rawhide has some changes to this, but I
> > have been doing custom firewalls for too long now to remember what they
> > are (I think they put in an ESTABLISHED,RELATED rule in now.)
> >
> > Are you forwarding traffic through your firewall or just using it as a
> > client. If you are using it as a client it is pretty ok and secure. If
> > you are using it as a forwarder you will probably want to make some
> > changes for interfaces to be semi-trusted.
>
> I'm not sure what this means. The firewall is set up on my home computer's
> kernel, which is also the only computer I have, no LAN (I think they call
> it). As I understand it, all packets coming and going from my computer
> pass through this firewall. I don't think I am doing any forwarding. Is
> this done for other computers connected to the net through the firewall?
>
> Faheem.
--
Stephen John Smoogen smoogen@lanl.gov
Los Alamos National Labrador CCN-5 Sched 5/40 PH: 4-0645 (note new #)
Ta-03 SM-1498 MailStop B255 DP 10S Los Alamos, NM 87545
-- So shines a good deed in a weary world. = Willy Wonka --
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-09-12 19:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-12 6:11 comments about lokkit default script Faheem Mitha
2003-09-12 8:02 ` Gavin Hamill
2003-09-12 17:26 ` Faheem Mitha
2003-09-12 18:38 ` Stephen Smoogen
2003-09-12 19:01 ` Faheem Mitha
2003-09-12 19:36 ` Stephen Smoogen
-- strict thread matches above, loose matches on Subject: below --
2003-09-11 15:10 Faheem Mitha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox