LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to stop a connection to a specific UDP/TCP port? (http://www.linuxquestions.org/questions/linux-networking-3/how-to-stop-a-connection-to-a-specific-udp-tcp-port-153573/)

aromes 03-04-2004 04:43 PM

how to stop a connection to a specific UDP/TCP port?
 
how to stop a connection to a specific UDP/TCP port?
for ie, I've just seen a connection at port 3765 and want to shut it down
on the fly!

chrisfirestar 03-04-2004 07:28 PM

if the connection is made to a service then kill the service i guess...
generally a connection can (i could be wrong) only be made to a port that has a service listening.. otherwise the port will appear closed (if you not using iptables to DROP the ports)

I would suggest that if you dont already have a firewall setup DO IT! iptables is very good just learn how to use it :D

qwijibow 03-04-2004 07:37 PM

block it in your firewall.

/sbin/iptables -I INPUT -p tcp --dport 3765 -j DROP
/sbin/iptables -I INPUT -p udp --dport 3765 -j DROP

or you can do it graphically with firestarter


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