Please notice that this isn't considered best practice for Windows Vista / Windows Server 2008 and above.
If you happen to use a newer version of Windows, make use of the built-in "Windows Firewall with Advanced Security".
Inb4 "lolol its a secrty thingy from m$, it sucks!":
It does it's job quite good, comparing to most "l33t" security solutions out there.
Also, it's quite intuitive to manage.
Say, you want to block incoming traffic for port 38170 (Cabal Manager, "Broadcast Port") except for one IP (in this example "
To view the content, you need to sign in or register
"):
- Run WF.msc
- Select "Inbound Rules"
- Click on "New Rule..."
- Select "Port" and click next
- Select "TCP" and "Specific local ports", type 38170 into the textbox and click next
- Select "Allow the connection"
- Select the network profiles wich you want to apply the rule on
- Enter a name and a description and click "Finish"
- Now right click the new created rule and click on "Properties"
- Open the tab "Scope", and select "These IP addresses" under "Remote IP adress"
- Click "Add"
- Select "This IP adress or subnet", and type in the IP adress or subnet you want (for the local machine it's 127.0.0.1, or the subnet 127.0.0.0/8 if you want to do it exactly)
- Click "Ok", and "Ok" again and you're done.
Now everyone except for the IP you specified will get a TCP RST when trying to connect to the port.