Unix Technical Forum

Re: packet blocking question

This is a discussion on Re: packet blocking question within the lucky.openbsd.misc forums, part of the OpenBSD category; --> > I've been reading Jacek's book on pf but haven't > found a way to block packets on the ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2008, 06:05 AM
Kevin
 
Posts: n/a
Default Re: packet blocking question

> I've been reading Jacek's book on pf but haven't
> found a way to block packets on the basis of the
> country of origin. Is it that possible in pf?


Yes, but you'll need to define what IP blocks you want blocked
yourself. I have resorted to this myself to stop certain known spam
havens from hitting some of my servers. I have a pf table
/etc/tables/spammers that does just that.

Then just add a table definition line and one simple pf rule as such:

--------------
....
table <spammers> persist file "/etc/tables/spammers"
....
block in log quick on $ext from <spammers> to any
....
--------------

In that table are subnets of all the IP blocks I want to consider as
spam havens to block.

One starting point for you to consider in your quest for IP lists is
/etc/spamd.conf which has URLs of places to get IP lists to
block--some of them are national. These lists can make the foundation
of what you're after I imagine.

Kevin






--
http://www.ebiinc.com -
Background Screening from EBI
Corporate background checks and drug testing, worldwide.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com