LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
Search this Thread
Old 11-18-2004, 09:37 PM   #1
Davus
Member
 
Registered: Jul 2004
Location: Mesquite, Texas
Distribution: currently retired
Posts: 31

Rep: Reputation: 15
Quick iptables IP address ban?


Hi, is there a quick iptables command that can be used to deny all traffic from a specified IP address? (Yes, I realize the data will still arrive, but the kernel will simply drop it.)
This would be useful in random situations, to just suddenly 'turn off' my server to a certain IP address. Thanks.

-Dave
 
Old 11-18-2004, 09:47 PM   #2
Butt-Ugly
Member
 
Registered: Nov 2004
Location: Brisbane, Australia
Distribution: Fedora Core 5
Posts: 89

Rep: Reputation: 15
Something simple like this shoud be enough.

iptables -I INPUT -s xxx.xxx.xxx.xxx -j DROP
 
Old 11-18-2004, 09:53 PM   #3
Davus
Member
 
Registered: Jul 2004
Location: Mesquite, Texas
Distribution: currently retired
Posts: 31

Original Poster
Rep: Reputation: 15
*Goes to test it*
I'll do this:

My laptop will ping the server, infinate loop. Then from my Linux desktop I'll do that command while SSH'd into the server and see if it drops. Thanks!

Uhh... Oops, it worked, banned desktop instead of laptop, got the addresses confused. Thanks. *SSH's in with PuTTY on laptop to fix my mistake* :$

Mm'kay, a simple iptables -F from my mom's box on PuTTY cleared it, I got bored and banned my laptop too.

Last edited by Davus; 11-18-2004 at 09:57 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables ban rule hypton Linux - Networking 1 03-09-2004 11:42 PM
using iptables to ban a subnet? Sm0k3 Linux - Networking 4 01-24-2004 04:25 PM
quick iptables question peok Linux - Networking 6 11-11-2003 03:34 PM
Should i use the eth0 ip address of my internet ip address when applying iptables ForumKid Linux - Security 2 01-03-2002 09:54 AM
Quick IP address question Jimbo Mahoney Linux - Networking 2 08-16-2001 06:50 PM


All times are GMT -5. The time now is 09:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration