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 02-13-2013, 01:56 AM   #1
madix
LQ Newbie
 
Registered: Feb 2013
Location: bangalore
Posts: 8

Rep: Reputation: Disabled
Unhappy how to drop packets received on a port


I want to drop packets on computer a received to dst port yyy from a computer b with ip x.x.x.x. What is the exact iptable command or any other command to do that? pls tell how to do it with native linux utils, I can not install third party utils.
 
Old 02-13-2013, 02:38 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,374

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
iptables -A INPUT -s x.x.x.x -p tcp --dport yyy -j DROP

this needs to be inserted into the correct point in your existing rulebase though, possibly persistently defined in /etc/sysconfig/iptables
 
1 members found this post helpful.
Old 02-13-2013, 03:35 AM   #3
madix
LQ Newbie
 
Registered: Feb 2013
Location: bangalore
Posts: 8

Original Poster
Rep: Reputation: Disabled
Smile thanks lottt!!! it helped...:)

Quote:
Originally Posted by acid_kewpie View Post
iptables -A INPUT -s x.x.x.x -p tcp --dport yyy -j DROP

this needs to be inserted into the correct point in your existing rulebase though, possibly persistently defined in /etc/sysconfig/iptables
Hi, it worked like charm, thanks lot!!!
 
  


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
10x increase in received packets K0ld Linux - Newbie 2 06-16-2009 11:36 PM
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 08:21 AM
drop packets for specific port with iptables ohcarol Linux - Security 1 07-03-2005 10:48 AM
which are these 0.0.0.0 source ip packets i received? linux_lover2005 Linux - Networking 1 04-29-2005 07:58 PM
packets sent VS packets received fsasya Linux - Networking 0 07-18-2004 07:11 PM


All times are GMT -5. The time now is 05:20 PM.

Main Menu
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