Eternal black, banned 445 port

They are generally in two ways:
1, through the firewall banned 445.
2, IP security policies through local Group Policy.

Mode 1:
Note: If the machine have special requirements, can not open the firewall, please skip this method!
Be sure to open the firewall, and then in the "Advanced Security Windows Firewall" inbound rule, added to prevent local policy 445 port, the system comes with 445 other ports policy can be ignored. Similar shots:
Eternal black, banned 445 port
Eternal black, banned 445 port

Bat close 445 port: ban other ports only need to modify localport = 138,139 and so on.

 @echo off

echo "state on firewall......"
sc config MpsSvc start=auto
netsh advfirewall set allprofiles state on

echo "start ICMP...."
netsh firewall set icmpsetting 8

echo "add port 445......"
netsh advfirewall firewall add rule name="close445tcp" protocol=TCP dir=in localport=445 action=block
netsh advfirewall firewall add rule name="close445udp" protocol=UDP dir=in localport=445 action=block

pause

Bat 445 open port:

@echo off

echo "state off firewall......"
netsh advfirewall set allprofiles state off

echo "delete port 445......"
netsh advfirewall firewall delete rule name="close445tcp"
netsh advfirewall firewall delete rule name="close445udp"

pause

Second way:
Win + R, enter: gpedit.msc, then open the Local Group Policy, do pay attention to strategy, be sure to set "assignment." You can also export the policy, available to other Windows machines
Eternal black, banned 445 port

Guess you like

Origin blog.51cto.com/fandecorator/2482530