LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   security newbie...turning off a specific network port (https://www.linuxquestions.org/questions/linux-security-4/security-newbie-turning-off-a-specific-network-port-392479/)

jys88 12-13-2005 04:15 PM

security newbie...turning off a specific network port
 
Hello,
I'm trying to turn off a specific network port (port7000). I've tried to find the application that runs it, using lsof, but I don't see anything associated with it. Is there a different way to find out how to turn it off, or a specfic way to turn off the port itself?

jakev383 12-13-2005 09:13 PM

Quote:

Originally Posted by jys88
Hello,
I'm trying to turn off a specific network port (port7000). I've tried to find the application that runs it, using lsof, but I don't see anything associated with it. Is there a different way to find out how to turn it off, or a specfic way to turn off the port itself?

Should really see what you're already running for a firewall (iptables-save >> firewall.txt), but try this at the command line - it may work or it may not:
Code:

/sbin/iptables -A INPUT -i eth1 -p tcp --dport 7000 -j DROP
with eth1 being whatever your public interface is. (probably eth0)

tkedwards 12-14-2005 04:22 PM

The way to find out what process is listening on that port is
Code:

netstat -nlp | grep 7000
this has to be run as root


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