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 08-25-2002, 12:20 PM   #1
ifm
Member
 
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
ipchains: add static IP global ban?


How would I add a single IP to ipchains to globally ban on every port on the system?
 
Old 08-25-2002, 04:57 PM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
ipchains -a input -p tcp -s a.b.c.d -j REJECT

and so on for each protocol. I'm not sure off the top of my head if you can use the -s switch without specifying the protocol, but you may be able to drop the "-p tcp".
 
Old 08-25-2002, 08:33 PM   #3
sharper
Member
 
Registered: Aug 2002
Location: MN USA
Distribution: slakware 9.0
Posts: 121

Rep: Reputation: 15
Not sure about ipchains, but iptables accepts 'all' as a protocol so you only have to write the rule once.

And why use REJECT instead of DROP?
 
Old 08-25-2002, 11:49 PM   #4
ifm
Member
 
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Original Poster
Rep: Reputation: 15
Thanks for the input. Figured it out.

I used:
ipchains -I input 20 -s 111.222.333.444 -j DROP

And it apparently did the trick. (the 20 is just what placement it got put, after other stuff, before other rejects, and obviously the IP is bogus here to protect the moronic).

Wouldn't have had to bother, if the dope wasn't pinging every port on the machine exactly every 5 minutes. What a F***up.
 
  


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
permanently add static route glock19 Linux - Networking 27 07-27-2015 04:59 PM
where does static and global variables stored raviksp General 0 04-28-2005 12:23 AM
need to add static dns record silvereye Linux - Software 10 12-20-2004 10:49 AM
add a static route in Network init files Ghitza Linux - Networking 1 11-19-2004 05:26 AM
Route add to ban IP range? astroboy5714 Linux - General 0 06-01-2004 03:07 PM

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

All times are GMT -5. The time now is 12:14 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