Monday, August 6, 2012

How to block IP from accessing your PC


Today, there are many malicious programs which infect your PC, and then allow the attacker to see private and important data from your computer. The best way to protect from the attacks is by using an anti-virus program.
But, sometimes even the antivirus makes mistakes. For example, Avast (which is my personal worst AV, although it's free) didn't pick up a direct connection from USA botnet to my friends PC, which was installed from a Google Chrome extension.
How did I stop that connection? Here are the steps:

  1. Start "Command Prompt" (Win+R -> type "cmd" without the quotes)

  2. Type "netstat -a" (without the quotes)
    • If you like the IPs exported to a file, type "netstat -a -> file.txt". A "file.txt" file will be created in the directory you are in.

  3. If you notice some suspicious IPs there, you can Google them, and if they lead to nowhere, or they lead to some site that you do not recognize, it's best to add them to the "hosts" file (next step).
  4. Open Windows Explorer, and go to "C:\Windows\System32\drivers\etc\". You will find a "hosts" file without any extension.
  5. Double-click the file, and open it with Notepad.
  6. Below the lines which have "#" add "127.0.0.1" followed by space, and then the IP you want to block. 
  7. Save the file, restart the PC, and all the IPs(and addresses) you added will be blocked next time your PC starts.
Good luck!

0 comments:

Post a Comment

 

WindowsBro | Windows tips, fixes, help.. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com