LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-07-2002, 01:59 PM   #1
cirrusgr
LQ Newbie
 
Registered: Nov 2002
Distribution: Debian Stable/Testing
Posts: 12

Rep: Reputation: 0
OS Fingerprinting and IPtables


I'm tring to block remote OS fingerprinting scans using IPtables.

What I'm using at the moment is (assuming that eth0 is my internet connection):
Code:
#block ICMP
iptables -N ICMP_BLOCK
iptables -A INPUT -p icmp --icmp-type address-mask-request -j ICMP_BLOCK -i eth0
iptables -A INPUT -p icmp --icmp-type address-mask-reply -j ICMP_BLOCK -i eth0
iptables -A ICMP_BLOCK -m limit --limit 5/m --limit-burst 40 -j LOG --log-prefix "ICMP -- Reject "
iptables -A ICMP_BLOCK -j DROP -i eth0

#block packets with bad flags (used by nmap's FIN, NULL, XMAS scan)
iptables -N BADFLAG
iptables -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j BADFLAG -i eth0
iptables -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j BADFLAG -i eth0
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j BADFLAG -i eth0
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j BADFLAG -i eth0
iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j BADFLAG -i eth0
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j BADFLAG -i eth0
iptables -A BADFLAG -m limit --limit 5/m --limit-burst 40 -j LOG --log-prefix "FLAG -- Reject "
iptables -A BADFLAG -j DROP -i eth0
It seems to work, but I was wondering if anybody knows any better way to achieve this.

Thanks
 
Old 12-07-2002, 04:50 PM   #2
peter_robb
Moderator
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
http://iptables-tutorial.frozentux.n...-tutorial.html
 
Old 12-07-2002, 06:48 PM   #3
cirrusgr
LQ Newbie
 
Registered: Nov 2002
Distribution: Debian Stable/Testing
Posts: 12

Original Poster
Rep: Reputation: 0
yea i know i've read through that. just asking what everybody else is using.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 05:25 AM
block OS fingerprinting bentman78 Linux - Security 12 06-21-2004 08:47 AM
Iptables - Couldn't load target `ACCPET':/lib/iptables/libipt_ACCPET.so: z00t Linux - Security 3 01-26-2004 02:24 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM


All times are GMT -5. The time now is 02:17 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration