Ssh – I can’t block port 22 to a specific IP (windows server 2008R2)

sshwindows-firewallwindows-server-2008

I'm using Bitvise SSH server and recently get a connection attempt every minute from one IP number. Bitvise terminates the connection immediately, but it's been going on every minute for days and I just want to block that IP number.

I've tried adding a rule in the firewall but it seems to just ignore the rule. I don't know what I'm doing wrong — I added a new rule, set it to block traffic, added the IP number, applied and saved the rule.

Bitvise does add its own rule to the firewall to allow traffic through port 22 to itself, and I thought maybe there was a conflict, but there's no way to prioritize/order rules in Windows firewall. I tried making my rule more specific by specifying port 22, but that didn't seem to help.

Thanks

Best Answer

You should be able to create a custom rule in windows firewall to do this (unless you're trying to use some other firewall) go to windows firewall click inbound rules, click new rule, click custom rule, click protocol and ports, Protocol type would be tcp, choose specific port and enter 22, enter the IP you're trying to block under scope, under action choose Block the connection, and that should do it