LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 06: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, 07: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, 09:09 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
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 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

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

All times are GMT -5. The time now is 09:35 PM.

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