LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-13-2003, 03:14 PM   #1
bruce1271
Member
 
Registered: Apr 2003
Location: Dallas, TX
Posts: 122

Rep: Reputation: 15
Problems blocking a single IP


I am using Iptables to block an IP address from reaching my http server.

I am using this format:

/sbin/iptables -A INPUT -s 24.61.212.175 -j DROP

What am I doing wrong?
It is still showing up in my error logs for http.
 
Old 05-13-2003, 03:34 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Well if you used it like that it will be ADDED to the input chain. So if you have 10 rules and rule 9 says that connections to port 80 = accepted and rule 10 is the block rule it will never be reached. you need to insert it as 1st rule:

/sbin/iptables -I INPUT 1 -s 24.61.212.175/32 -j DROP

This will insert is as first rule. If you need more help take a look at the manpage of iptables (man iptables).
 
Old 05-13-2003, 03:59 PM   #3
bruce1271
Member
 
Registered: Apr 2003
Location: Dallas, TX
Posts: 122

Original Poster
Rep: Reputation: 15
I gotcha, but wouldnt the last chain take precidence? Or is the 1st rule obeyed at all times?
 
  


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
So many AC-97 sound problems, lets bring them to a single thread. nathanmoorehead Linux - Hardware 20 01-03-2007 11:20 AM
Completely new to Linux in every single way, and having problems. Woody_S_85 Linux - Newbie 10 01-21-2005 11:31 AM
'su' problems for single user charmsrunner Linux - Software 4 12-17-2004 11:20 PM
Troubles blocking single IPs using IPtables dave_blob Linux - Networking 5 04-04-2004 06:07 AM
Problems sending mail to a single domain with qmail dwbizzle Linux - Software 2 09-26-2003 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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