Results 1 to 3 of 3

Thread: how to stop a connection to a specific UDP/TCP port?

  1. #1
    aromes
    Guest

    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!

    Thanks for reply

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    304

    Re:how to stop a connection to a specific UDP/TCP port?

    That depends on what you mean.

    If you want to firewall it, use iptables.

    If you want the firewall rules created automagically, use something like Portsentry.

    If you want to terminate an existing connection, you'll need to locate what program is running that is using that connection and terminate it. lsof, netstat, ps, etc etc etc...

  3. #3

    Re:how to stop a connection to a specific UDP/TCP port?

    Bit late here but the command to do it on the fly with iptables would be

    iptables -A INPUT -p tcp --dport 3765 -j DROP

    instead of DROP you could also use REJECT

    if the connection is going out of port 3765 instead of comming in then replace INPUT with OUTPUT
    Its better to regret something you have done than to regret something you havent done :P

Similar Threads

  1. Replies: 0
    Last Post: 12-06-2007, 04:52 PM
  2. Port Open for Connection or Not
    By honey bee in forum Linux - General Topics
    Replies: 7
    Last Post: 02-08-2007, 11:37 AM
  3. dual port net card: port trunking?
    By Blaqb0x in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 02-06-2003, 10:33 PM
  4. Distro Specific
    By Schotty in forum Announcements and Suggestions
    Replies: 2
    Last Post: 10-30-2002, 12:09 AM
  5. Connection refused to port 25
    By asaf in forum Linux - General Topics
    Replies: 6
    Last Post: 07-12-2002, 09:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •