create a windows firewall rule to block connections.

nav2567
nav2567 used Ask the Experts™
on
I want to create a windows firewall rule to block a connect between an internal  Windows 2016 server to an external IP.  

Please advise how to do it.  

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
Create an Inbound rule to block the IP. One rule for each IP.

Also use your router for this. May be better suited

Windows Firewall
Top Expert 2016

Commented:
Inbound communications / outbound communications? Which ports or protocols? Most ports are opened with firewall rules for only the local network.

Author

Commented:
We run netstat on the server and see an external connection between the server and a host in the internet.  So we want to block outbound between server and this external host.  Thanks.
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
So then use the rule window above to do this.
Technical Specialist
Awarded 2017
Distinguished Expert 2018
Commented:
Run this
netsh advfirewall firewall add rule name="BLOCKED IP" interface=any dir=in action=block remoteip=REMOTE_IP_ADDRESS

Open in new window

https://www.experts-exchange.com/articles/31687/Windows-Firewall-as-Code.html

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial