Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Is there something that can close an established connections? I need it when a hacker hacks into my computer....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    139

    how to close connections?


    Is there something that can close an established connections? I need it when a hacker hacks into my computer.

  2. #2
    Just Joined!
    Join Date
    Nov 2004
    Location
    AU
    Posts
    58
    1 a pair of wire cutters on your modem line
    2 the off button in your computer

  3. #3
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    139
    Quote Originally Posted by junme
    1 a pair of wire cutters on your modem line
    2 the off button in your computer
    I meant a command line or graphical utility, like Sysinternals's TCPView for Windows.

  4. #4
    Linux User
    Join Date
    Jan 2004
    Posts
    357
    Most any firewall will allow you to stop all traffic (to and from) your computer. You don't say what distro you are using, but I would assume that they all have a stock firewall. Or look at something like firestarter or smoothwall.

    Or you can shut down the ethernet card by opening a terminal and doing

    Code:
    ifdown eth0
    Change the 0 (zero) in eth0 to what every interface you have active at the time.


    If you want to bring it back up do

    Code:
    ifup eth0
    Note: you will probably need to be root to do this

  5. #5
    Linux Newbie jeickal's Avatar
    Join Date
    Jan 2005
    Location
    Switzerland
    Posts
    114
    Shutting down the ethernet interface is kinda brutal, yet efficient I admit....
    But if you need to keep browsing while ending an intruder's connection to your PC, besides using a firewall as logan5 suggested there is another indirect way:
    Add a static route pointing to his IP redirecting the traffic to localhost. This way the packets sent from the cracker's PC will reach your PC but he will never get anything back (since the return path is pointing to localhost). If you dont make the route persistant it will go away at the next reboot.

    OK I know, it's not as having a command to end the connection like you were asking, but it has an advantage: The bad guy will believe you disconnected your computer from the network, since he will never get any answer back. If you find a way to end its connection, he could start over a second after you disconnected him, and even DoS you.

  6. #6
    Linux User zeeone's Avatar
    Join Date
    Oct 2003
    Location
    Third Stone From The Sun
    Posts
    287
    Or you could reach over and turn off your modem.
    Research, research, research before you walk the plank.
    Registered Linux User #398829

  7. #7
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    logan5, i am not too sure as to how well this will work (unless u leave it down for a short while. When i ssh into my server and run
    Code:
    /etc/init.d/network restart
    the ssh session doesn't die, and i am still connected. So i would suggest stoppin network for 5 mins so a timeout can occur on the 'hacker' before bringing back up.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  8. #8
    Linux Newbie jeickal's Avatar
    Join Date
    Jan 2005
    Location
    Switzerland
    Posts
    114

    Re: how to close connections?

    Quote Originally Posted by user222
    Is there something that can close an established connections? I need it when a hacker hacks into my computer.
    I found a small program called "hunt" that looks like it has the ability to reset TCP connections.
    I didn't have time to try it yet. But the description looks interesting:
    ==> http://lin.fsid.cvut.cz/~kra/index.html

  9. #9
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    If you know what process the cracker (not hacker, please!) is connected to, just "kill -9 <pid>" it (where <pid> is that process's ID).

  10. #10
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    139
    Is there something like TCPView for Windows that runs on Linux? It shows the active connections graphically, and it could also close active connections.

    this is what it looks like:
    http://www.2and2.net/Uploads/Images/tcpview_win.gif

Page 1 of 2 1 2 LastLast

Posting Permissions

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