Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 10-07-2006, 06:31 AM   #1
Registered: Nov 2005
Location: India
Posts: 42

Rep: Reputation: 15
iptables blocking 7327 port

HI friends,
i want to block specific port 7327 (which is private port).I am trying to block that port through iptables
"/sbin/iptables -A INPUT -d destip -s sourceip -p tcp --sport 7327 -j ACCEPT"
but it is not happening...
what is the correct comamnd any one will provide input...?

Old 10-07-2006, 07:34 AM   #2
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
If you are looking to block all incoming traffic on port 7327 then you'll need to use --dport instead of --sport.

iptables -I INPUT -m tcp -p tcp --dport 7327 -j DROP
iptables -I INPUT -m udp -p udp --dport 7327 -j DROP
Old 10-09-2006, 09:09 AM   #3
Senior Member
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,284

Rep: Reputation: 61
Are you trying to block with a firewall that is on a workstation or a router/firewall?

If it's on a router you will need to use the FORWARD chain to drop it:

/sbin/iptables -A FORWARD --dport 7327 -j DROP


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
blocking an IP using iptables picox Linux - Security 7 12-10-2010 03:00 PM
Blocking an IP with iptables asif2k Linux - Security 4 04-19-2006 12:22 AM
Question about port blocking with Iptables GUIPenguin Linux - Networking 2 10-11-2004 07:25 PM
port blocking EyaL Linux - Security 3 10-19-2002 09:58 PM
iptables - advanced port blocking/stealth mode siymann Linux - Security 1 10-26-2001 06:21 AM

All times are GMT -5. The time now is 10:11 PM.

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