LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables blocking 7327 port (https://www.linuxquestions.org/questions/linux-security-4/iptables-blocking-7327-port-490284/)

santhosh.linux 10-07-2006 05:31 AM

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

SlackDaemon 10-07-2006 06:34 AM

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

fotoguy 10-09-2006 08:09 AM

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


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