* LOG target for rate-limiting on iptables not working...?
@ 2006-03-02 23:26 Jens Knoell
2006-03-03 0:55 ` Stephen Samuel
2006-03-03 3:12 ` Stephen Samuel
0 siblings, 2 replies; 3+ messages in thread
From: Jens Knoell @ 2006-03-02 23:26 UTC (permalink / raw)
To: linux-admin
I've rate-limited the incoming connections to some ports. The rate
limiting works, but it doesn't log to syslog... other non-rate-limiting
rules where LOG targets exist work, so I know logging in principle works.
What am I missing? No LOG target for this module? :)
Rule:
# POP3 (max 5 per minute)
$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
--set
$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
--update --seconds 60 --hitcount 5 -j LOG --log-level warn --log-prefix
"RLIMIT[POP3]: "
$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
--update --seconds 60 --hitcount 5 -j REJECT
Also, is there any advantage to use DROP instead of REJECT? Just
curious.
J
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LOG target for rate-limiting on iptables not working...?
2006-03-02 23:26 LOG target for rate-limiting on iptables not working...? Jens Knoell
@ 2006-03-03 0:55 ` Stephen Samuel
2006-03-03 3:12 ` Stephen Samuel
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Samuel @ 2006-03-03 0:55 UTC (permalink / raw)
To: Jens Knoell; +Cc: linux-admin
I usually just have a rule like logreject:
$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
--update --seconds 60 --hitcount 5 -j LogReject1
# RULE: Logreject:
$FW -N LogReject1
$FW -I LogReject1 -j LOG --log-level warn --log-prefix "RLIMIT[POP3]:
$FW -I LogReject1 -j REJECT
Jens Knoell wrote:
>I've rate-limited the incoming connections to some ports. The rate
>limiting works, but it doesn't log to syslog... other non-rate-limiting
>rules where LOG targets exist work, so I know logging in principle works.
>What am I missing? No LOG target for this module? :)
>
>
>
>Rule:
>
># POP3 (max 5 per minute)
>
>$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
>--set
>
>$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
>--update --seconds 60 --hitcount 5 -j LOG --log-level warn --log-prefix
>"RLIMIT[POP3]: "
>
>$FW -I INPUT -p tcp --dport 110 -i eth0 -m state --state NEW -m recent
>--update --seconds 60 --hitcount 5 -j REJECT
>
>
>Also, is there any advantage to use DROP instead of REJECT? Just
>curious.
>
>
--
Stephen Samuel +1(604)450-0066 samnospam@bcgreen.com
http://www.bcgreen.com/
Powerful committed communication. Transformation touching
the jewel within each person and bringing it to light.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LOG target for rate-limiting on iptables not working...?
2006-03-02 23:26 LOG target for rate-limiting on iptables not working...? Jens Knoell
2006-03-03 0:55 ` Stephen Samuel
@ 2006-03-03 3:12 ` Stephen Samuel
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Samuel @ 2006-03-03 3:12 UTC (permalink / raw)
To: Jens Knoell; +Cc: linux-admin
Reject will send either a Reset (RST) packet (TCP)
or an ICMP reject (UDP)
Drop will silently ignore the packet's existence.
The sender will get no response at all
If you have no listening ports, and everything that is not
associated with an outgoing connection is DROPped (as opposed
to rejected) it makes it rather hard for a random attacker
to realize that your
Generally I would say that errant packets from 'presumed friendly'
machines can probably be safely rejected. Packets from 'presumed
hostile' addresses should probably be silent dropped.
Jens Knoell wrote:
>I've rate-limited the incoming connections to some ports. The rate
>limiting works, but it doesn't log to syslog... other non-rate-limiting
>rules where LOG targets exist work, so I know logging in principle works.
>What am I missing? No LOG target for this module? :)
>
>Also, is there any advantage to use DROP instead of REJECT? Just
>curious.
--
Stephen Samuel +1(604)450-0066 samnospam@bcgreen.com
http://www.bcgreen.com/
Powerful committed communication. Transformation touching
the jewel within each person and bringing it to light.
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-03 3:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-02 23:26 LOG target for rate-limiting on iptables not working...? Jens Knoell
2006-03-03 0:55 ` Stephen Samuel
2006-03-03 3:12 ` Stephen Samuel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).