1 |
Hi all, |
2 |
|
3 |
I was reading up on some iptables rules in the gentoo security handbook: |
4 |
|
5 |
http://www.gentoo.org/doc/en/security/security-handbook.xml?part=1&chap=12&style=printable |
6 |
|
7 |
It mentions DROPing packets with an INVALID state. |
8 |
|
9 |
It sounded/sounds like a good idea, so I added the following rule: |
10 |
|
11 |
-A INPUT -i eth0 -m state --state INVALID -j LOG |
12 |
|
13 |
As suggested, I addd this rule just ABOVE this one: |
14 |
|
15 |
-A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT |
16 |
|
17 |
I also changed the DROP action to LOG so I could see what it did if |
18 |
anything. |
19 |
|
20 |
Right after adding this rule, I started seeing lines like this in the log: |
21 |
|
22 |
Dec 16 10:15:31 myhost kernel: IN=eth0 OUT= |
23 |
MAC=00:e0:81:54:9c:8a:00:90:7f:86:a8:c0:08:00 SRC=208.87.137.233 |
24 |
DST=192.168.1.252 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=0 DF PROTO=TCP |
25 |
SPT=50113 DPT=25 WINDOW=0 RES=0x00 RST URGP=0 |
26 |
|
27 |
What I don't understand is why it isn't using my LOG prefix that is used |
28 |
for everything else: |
29 |
|
30 |
-A INPUT -j LOG --log-prefix "(>fw-drop): " --log-level 7 |
31 |
|
32 |
Anyone? |