LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-30-2006, 01:17 AM   #1
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
Question block first icmp pakets then let them go


Hi all,
I am trying to build a set of rules (with iptables) to create a partial icmp blocking. I want to block the first 4 icmp packets and after that 4 to let them go.
Is it possible to do that?
 
Old 03-30-2006, 06:12 AM   #2
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Original Poster
Rep: Reputation: 30
I tryed with -m limit, but is not quite a solution...

iptables -A INPUT -p icmp -m limit --limit 6/min -j DROP
iptables -A INPUT -p icmp -m limit --limit 2/min -j ACCEPT
iptables -A INPUT -p icmp -j DROP

but it is anoing to wait a minnute
 
Old 03-30-2006, 11:05 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
yeah, i think the "limit" match would suck in this case...

sounds like you might be better-off using the "nth" match:

http://netfilter.org/projects/patch-...l#pom-base-nth

just a thought...
 
Old 03-31-2006, 01:18 AM   #4
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Original Poster
Rep: Reputation: 30
looks like more fore me i'll give it a try ... thx win32sux
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ipcop, block icmp on red interface webstuff Linux - Security 9 04-18-2005 09:43 PM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
building xfree86 debian pakets maxeuer Debian 2 02-24-2005 08:41 PM
ICMP traffic archives/writing ICMP traffic in a file maia_1 Programming 0 07-20-2004 03:43 AM
Is that a good thing to block ICMP protocol on a Web server? Iced Earth Linux - Security 2 06-15-2004 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration