Re: Clever firewall rules
From: Fabrice MARIE (fabrice@celestix.com)Date: 09/15/01
- Previous message: Ken Weaverling: "Re: Clever firewall rules"
- In reply to: Scott Gifford: "Re: Clever firewall rules"
- Next in thread: Prakash Purushotham: "Re: Clever firewall rules"
- Next in thread: Scott Gifford: "Re: Clever firewall rules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Message-Id: <200109150445.f8F4jaJ01265@fabrice.celestix.com> From: Fabrice MARIE <fabrice@celestix.com> To: Scott Gifford <sgifford@tir.com>, "Rob 'Feztaa' Park" <fezziker@home.com> Subject: Re: Clever firewall rules Date: Sat, 15 Sep 2001 04:45:35 +0000
On Friday 14 September 2001 02:27, Scott Gifford wrote:
> Thanks for posting these; I'd love to see others follow suit, and
> maybe we can put together a "recommended" ruleset for a couple
> different configurations.
Hello,
I usually compile in some netfilter patch-o-matic extensions that I quite like...
the extensions I usually compile in are :
TTL match+target
ipv4options match
length match
pkttype match
psd match
time match
log match (to be able to log&drop in the same time).
[...for the very short list, but the rest of the p-o-m
patches are quite cool too, one just have to need them
to compile them in, that's all :)]
1- I will usually make sure all the packets with a TTL less 3
coming onto my firewall get their TTL incremented by 5.
It can be dangerous if you have some complex routing involved
(risk to have loops), but just pay attention and it is going
to be fine (TTL match+target).
2- drop all the packets with source routing, record route, timestamp
or router-alert options (ipv4options match)
3- drop all the outgoing (generated by a box on the LAN or the firewall itself)
icmp-time-exceeded to avoid being tracerouted.
4- drop all the incoming big icmp packets,
some weird devices do not really like big icmp packets.
(length match)
5- drop all incoming broadcast packets (pkttype match).
6- drop all packets that seems to be part of a portscan (psd match).
7- use time enforcement for some services that only your employee
use during office hours (time match).
cat "0" > /proc/sys/net/ipv4/tcp_timestamps
or add
net.ipv4.tcp_timestamps = 0 in /etc/sysctl.conf
if you want to avoid nmap to find out (with -O) that you run linux ;-)
Addionally, people won't be able to remotely guess your up-time either.
cat "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all
or add
net.ipv4.icmp_echo_ignore_all = 0 in sysctl.conf
if you want your box to not reply any echo request (ping).
the /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts can be usefull
too if you don't want to disable all pings reply, you should at least
turn of reply to broadcast...
just my 2 cents.
Actually, if you have some cool rulesets or some good examples of usage
of some particular netfilter matches, you can always send your ruleset
to the netfilter mailing list. Netfilter folks are always looking for
more documented ruleset to put in the 'examples' section.
Have a nice day,
Fabrice.
-- Fabrice MARIE Senior R&D Engineer Celestix Networks http://www.celestix.com/"Silly hacker, root is for administrators" -Unknown
- Previous message: Ken Weaverling: "Re: Clever firewall rules"
- In reply to: Scott Gifford: "Re: Clever firewall rules"
- Next in thread: Prakash Purushotham: "Re: Clever firewall rules"
- Next in thread: Scott Gifford: "Re: Clever firewall rules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|