LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-08-2012, 02:52 AM   #1
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
iptables drop


Hi
I have a RHEL3 server running. On running iftop it shows heavy traffic from one of my local LAN IP which is behind the proxy.
i have done
iptables -A INPUT -s 192.168.10.101 -j DROP
iptables -A OUTPUT -d 192.168.10.101 -j DROP
But still iftop shows heavy traffic comming toand fro from this ip. How to I stop all traffic to and from the ip 192.168.10.101

Sanjib Gupta
 
Old 06-08-2012, 02:54 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that should work fine, so maybe you've added it in the wrong part of the ruleset? after an alternative ACCEPT entry maybe? What does "iptables -vnL" say?
 
Old 06-08-2012, 03:05 AM   #3
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
iptables -vnl
Chain OUTPUT (policy ACCEPT 8521K packets, 6029M bytes)
pkts bytes target prot opt in out source destination
3 354 DROP all -- * * 0.0.0.0/0 192.168.10.101
Chain INPUT (policy ACCEPT 4320K packets, 5311M bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 192.168.10.101 0.0.0.0/0

iftop -i eth2 output

pool-173-72-57-102.cmdnnj.fios.verizon.net => 192.168.10.101 916Kb 743Kb 340Kb
<= 15.7Kb 12.9Kb 5.96Kb
173.194.14.112 => 192.168.10.138 351Kb 550Kb 348Kb
<= 10.3Kb 8.59Kb 5.50Kb
cm27.kappa176.maxonline.com.sg => 192.168.10.101 39.6Kb 31.9Kb 22.8Kb
<= 482Kb 378Kb 266Kb
117.194.7.138 => 192.168.10.101 28.3Kb 57.9Kb 67.3Kb
<= 74.8Kb 347Kb 333Kb
117.192.25.196 => 192.168.10.101 264Kb 168Kb 79.0Kb
<= 159Kb 169Kb 151Kb
cpc1-wolv12-0-0-cust790.wolv.cable.virginmedia.com => 192.168.10.101 2.84Kb 3.95Kb 4.30Kb
<= 129Kb 210Kb 216Kb
bb219-74-41-50.singnet.com.sg => 192.168.10.101 5.42Kb 5.19Kb 2.34Kb
<= 159Kb 145Kb 60.2Kb
host86-162-217-161.range86-162.btcentralplus.com => 192.168.10.101 223Kb 133Kb 314Kb
<= 4.31Kb 2.59Kb 5.44Kb
pool-173-51-92-21.lsanca.fios.verizon.net => 192.168.10.192 776b 2.04Kb 1.61Kb
<= 132Kb 132Kb 92.4Kb
115.78.133.255 => 192.168.10.101 5.74Kb 3.94Kb 3.95Kb
<= 182Kb 125Kb 129Kb
dsl.49.144.142.42.pldt.net
 
Old 06-08-2012, 03:10 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Oh, you mean this is on the proxy? You're on a box in the middle?? In that case it's the FORWARD table you need to look at, not INPUT / OUTPUT.
 
Old 06-08-2012, 04:50 AM   #5
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
How to control FORWARD chain
Sanjib Gupta
 
Old 06-08-2012, 05:05 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just the same as the other ones, replace INPUT with FORWARD
 
Old 06-08-2012, 06:42 AM   #7
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
Thanks it worked
Sanjib Gupta
 
  


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
[SOLVED] iptables not getting it to drop packets danoelke Linux - Networking 2 04-19-2012 12:17 PM
[SOLVED] IPTables OUTPUT DROP x201s Linux - Networking 3 02-22-2011 11:24 AM
[SOLVED] iptables: drop rule mrmnemo Linux - Newbie 3 04-21-2010 12:14 AM
my iptables can't drop ip of 71.6.40.83 38699678 Linux - Newbie 1 04-23-2008 09:22 PM
iptables - drop all -> allow needed OR allow all -> drop specific lucastic Linux - Security 5 12-21-2004 03:07 AM

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

All times are GMT -5. The time now is 07:50 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
Open Source Consulting | Domain Registration