LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-28-2003, 09:41 AM   #1
Artimus
Member
 
Registered: Feb 2003
Location: Wisconsin
Distribution: Slackware
Posts: 188

Rep: Reputation: 30
Port Scan Detectors for IPTables


Hello, my friend is working with Red Hat and is using ipchains for his firewall. I want to try to do this with iptables. When you try a portscan on his box, it will ignore you for like 24 hours. Anybody have any ideas on how to do this with iptables?

Secondly, how are these firewall rules? I can't remember the syntax off hand, but this is what I have in have iptables doing

Default Policies:
Incoming Drop
Forward Drop
Outgoing Allow

INPUT:
#Allows my Apache server:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
#Allows my IRC server:
iptables -A INPUT -p tcp --dport 6667 -j ACCEPT
#Allows Internet Access
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
#Don't waste bandwidth on telnet
iptables -A INPUT -p tcp --dport 23 -j DROP
#Don't waste bandwidth on ftp
iptables -A INPUT -p tcp --dport 21 -j DROP
#If it doesn't match a previous rule, let's log it
iptables -A INPUT -j LOG
 
Old 02-28-2003, 10:24 AM   #2
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
Are you sure he's doing that ONLY with IPCHAINS?

I remember an article a while back (I don't have a link sorry) that featured a script that basically waited til ipchains output what the author interpreted as a hostile communication...then the script would add the IP of origin to the HOST.DENY file.

Maybe your friend is doing something like that? Adding the IP to host.deny and then every 24 hours clearing it out?
 
Old 02-28-2003, 11:34 AM   #3
Artimus
Member
 
Registered: Feb 2003
Location: Wisconsin
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 30
The could be. I mean I know he's using some kind of script WITH ipchains. I want to duplicate it for IPTables.
 
Old 03-03-2003, 04:57 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
There is a programme called Portsentry I have used with ipchains...
 
  


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
mysqld running and reading for connections on port 3306, no port 3306 found from scan darkenigmaa Linux - Networking 10 07-13-2016 11:53 AM
port scan. bruse Linux - Networking 1 10-23-2005 05:41 PM
How can I scan *every* port with nmap? davee Linux - Security 6 12-11-2003 04:44 PM
port scan Tigger Linux - Security 18 06-08-2003 05:44 PM
Port scan luser Linux - Networking 4 10-11-2002 01:37 PM

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

All times are GMT -5. The time now is 12:10 AM.

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