

Add firewall rules to reject further packets transmitted/received in that connection (on Linux, iptables with target "REJECT", matching on source and destination TCP ports and IP addresses in OUTPUT and INPUT filter chains).It wouldn't kill the connection, just make it inactive though. You can remove the connection from the Linux connection tracker table ( x in iptstate), which would usually cause newer packets to be ignored (if the firewall is configured to only accept new connections with TCP SYN).

tcpkill (from dsniff package) that fakes the TCP packets that would close a connection.(as the user running the VNC server or as root) would also tell you the currently established TCP connections handled by that VNC server (in case it's not on port 5900).Īmong the methods to close a TCP connection in the general case, there's: grep searches the named input FILEs (or standard input if no files are named. If you know the name of the VNC server command, lsof -ai tcp -c that-command report a snapshot of the current processes. This will return a list of all the RPM packages that are installed on the machine, and any that include the term vnc in the name. First, open a terminal window and type in the command rpm -qa grep -i vnc. Would tell you the currently established TCP connections on port 5900.įor anything else, we'd need to know what VNC server you're using as there exist dozens. Checking if VNC is installed on a Linux machine is a relatively simple process that can be completed in a few steps.
