Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-09-2013, 08:25 AM   #1
Registered: Sep 2013
Posts: 47

Rep: Reputation: Disabled
Question iptables not woking properly

Hi folks,

Today, I have faced a peculiar problem while one of my server was on DOS attack. I got number of request from unknown IP address x.x.x.x.

I am using CentOS 6.0. I tried to block this IP x.x.x.x with following command as a root user.

iptables -A INPUT -i eth0 -s x.x.x.x -j DROP

but it could not help me.

my other rules are working fine.

Looking forward for help on the same.

Thanks in advance.
Old 09-09-2013, 08:50 AM   #2
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 58
Your entry: iptables -A INPUT -i eth0 -s x.x.x.x -j DROP

ADDS the rule to the table. The offending packets have already been handled. The solution? Use "iptables -I INPUT ..." Inserts at beginning of table.
Old 09-10-2013, 02:23 AM   #3
Registered: Sep 2013
Posts: 47

Original Poster
Rep: Reputation: Disabled
Thanks! Dave

Old 09-10-2013, 03:48 AM   #4
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
iptables -I INPUT -s x.x.x.x -j DROP

will also do the same job.


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
Migrate to IPTABLES, help to configure properly lithos Linux - Security 3 02-10-2012 12:47 PM
Commands not woking mvanil Linux - Desktop 4 11-16-2011 03:24 AM
Mouse is not woking on Redhat addiss Linux - General 1 01-10-2009 08:43 AM
etch-mouse not woking properly methanigai Debian 1 09-12-2007 02:26 PM
Iptables in fedora wont work properly nightmare6667 Linux - Networking 2 02-22-2004 12:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration