CONNLIMIT settings not obeyed by PS_LIMIT

Post Reply
Sergio
Junior Member
Posts: 1689
Joined: 12 Dec 2006, 14:56

CONNLIMIT settings not obeyed by PS_LIMIT

Post by Sergio »

Hi,
there is an issue with CONNLIMIT and PS_LIMIT.

I have set:
CONNLIMIT = 80;20,2095;10

and under PORT SCAN TRACKING:
PS_LIMIT = 10

But blocks for CONNLIMIT are done at 10 and not at 20 on port 80 as specified, this is what LFD reports:

Time: Mon Apr 21 12:12:15 2014 -0500
IP: xx.xx.xx.xx (xx)
Hits: 11
Blocked: Temporary Block

Sample of block hits:
Apr 21 12:11:58 server1 kernel: Firewall: *ConnLimit* IN=eth1 OUT= MAC=xx.xx.xx.xx SRC=xx.xx.xx.xx DST=xx.xx.xx.xx LEN=60 TOS=0x00 PREC=0x00 TTL=49 ID=48773 PROTO=TCP SPT=15761 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0

Apr 21 12:11:58 server1 kernel: Firewall: *ConnLimit* IN=eth1 OUT= MAC=xx.xx.xx.xx SRC=xx.xx.xx.xx DST=xx.xx.xx.xx LEN=60 TOS=0x00 PREC=0x00 TTL=49 ID=48773 PROTO=TCP SPT=15761 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0

Apr 21 12:11:59 server1 kernel: Firewall: *ConnLimit* IN=eth1 OUT= MAC=xx.xx.xx.xx SRC=xx.xx.xx.xx DST=xx.xx.xx.xx LEN=60 TOS=0x00 PREC=0x00 TTL=49 ID=48773 PROTO=TCP SPT=15761 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0

and so on...

Regards,

Sergio
ForumAdmin
Moderator
Posts: 1523
Joined: 01 Oct 2008, 09:24

Re: CONNLIMIT settings not obeyed by PS_LIMIT

Post by ForumAdmin »

That is to be expected. You should remove port 80 from PS_PORTS if you do not want CONNLIMIT triggers to affect PS_LIMIT.
Sergio
Junior Member
Posts: 1689
Joined: 12 Dec 2006, 14:56

Re: CONNLIMIT settings not obeyed by PS_LIMIT

Post by Sergio »

Thanks for answering back, just a doubt?

Why is marked as *ConnLimit* instead of *TCP_IN Blocked*?

This is a regular PORT SCAN block:
Apr 21 12:04:39 atitlan kernel: Firewall: *TCP_IN Blocked* IN=eth1 OUT= MAC=xx.xx.xx.xx SRC=xx.xx.xx.xx DST=xx.xx.xx.xx LEN=60 TOS=0x00 PREC=0x00 TTL=42 ID=14655 DF PROTO=TCP SPT=34784 DPT=23 WINDOW=5840 RES=0x00 SYN URGP=0

I have set the following:
PS_PORTS = 0:79,81:65535,ICMP
ForumAdmin
Moderator
Posts: 1523
Joined: 01 Oct 2008, 09:24

Re: CONNLIMIT settings not obeyed by PS_LIMIT

Post by ForumAdmin »

That is because CONNLIMIT entries are only made in iptables after the limit has been reached. So you're seeing the 20 CONNLIMIT connection limit being exceeded 10 times which is why PS_LIMIT was being triggered.
Sergio
Junior Member
Posts: 1689
Joined: 12 Dec 2006, 14:56

Re: CONNLIMIT settings not obeyed by PS_LIMIT

Post by Sergio »

got it!

Thanks for explaining.

Regards,

Sergio
Post Reply