Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 05:44:29 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Banning IP's Permanently.  (Read 966 times)
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« on: July 26, 2005, 05:36:34 AM »

Hello!

Using the iptables -I INPUT -s xxxxxxxx -j DROP
command I am supposed to block unwanted
visits from specific IP's.

The predicament is that these IP's keep returning
after a few days; is it feasible to permanently block
those visits from coming?

For instance, there are robots, hackers and hustlers
that originate from some IP's which I'd rather ban
via the DROP method but... they come back, so the
'blockage' is only good for a matter of time.

Also is there a possibility to bamboozle potential
attackers by causing them argh...!!!  some sort of havoc?

Any advice?

Thanks,
George
Logged
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8877


nihil sunt omnia


WWW
« Reply #1 on: July 26, 2005, 06:48:00 AM »

Hi George,

Actually, using iptables -I INPUT -s xxxxxxxx -j DROP will just block the IP for around 24 hours or until the firewall cron runs that removes those input into the table in this manner.  Instead you can enter this command to edit the deny_hosts file:

vi /etc/apf/deny_hosts*

Scroll to the end of the file, and enter to insert text:

Esc + I

Press the enter key to go to the next line so the new IP will be on its own line, then paste the IP in question. To save, enter the Esc key, then (this writes and quits):

:wq

At the command prompt after you have left the file, then enter the following which will restart the firewall so the changes take affect:

/etc/init.d/apf restart

Adding an IP to deny_hosts file is a permanent block.

Thanks.
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #2 on: July 26, 2005, 06:41:53 PM »

Danielle,

Very helpful - thanks a lot; will try it next time it's needed.

Gracefully,
George
Logged
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #3 on: July 26, 2005, 07:16:40 PM »

OK Danielle - it must have worked exactly as you instructed.

Check the obfuscated snapshot.
I added an IP right down below
another one whereas the red arrow points at.


So each time I will have to keep adding IP's,
right bottom below to the one I added, right?

Very helpful procedure indeed - thanks.
Logged
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8877


nihil sunt omnia


WWW
« Reply #4 on: July 26, 2005, 10:57:06 PM »

Hi George, I'm not seeing a snapshot, did you attach it? Smile

You would keep adding IPs for each one you want to block with the new ones added at the bottom and no empty lines between each IP (so they are in a list):

Prior IP listed
Prior IP listed
New IP1
New IP2
New IP3
and so on
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #5 on: July 27, 2005, 04:20:18 AM »

Danielle,

In my post above I have embedded a jpg picture.

OK, got that IP hierarchy. Thanks a lot for your help. Applause
Logged
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8877


nihil sunt omnia


WWW
« Reply #6 on: July 27, 2005, 06:28:24 AM »

You're welcome and I figured out what you meant for the jpg now. Glad it is working for you Thumbs Up
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM