LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 10-07-2006, 05:31 AM   #1
santhosh.linux
Member
 
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
like
"/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...?

santhosh
 
Old 10-07-2006, 06:34 AM   #2
SlackDaemon
Member
 
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, 08:09 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,279

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:

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


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


All times are GMT -5. The time now is 06:05 AM.

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