Block open ports

I want to block open ports e.g 445 on my windows server 2012 R2 server. I have tried to follow the procedure of adding an inbound rule in windows firewall advanced settings but when I run nmap the report still shows port 445 as open. is there another way of blocking/disabling the port
Shepherd KwashiwaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
netcmhCommented:
Have you tried this:

Open up cmd as "Run as administrator."
Type in the following:
 netsh advfirewall set allprofile state on <Enter>
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=445 name="Block_TCP-445" <Enter>

You can also do it via registry:

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NetBT\Parameters
Right click the blank area and select New. Select DWORD (32-bit) Value.
Call it SMBDeviceEnabled. Modify it, and change Value data from 1 to 0
and then disable the Windows Server service
1
 
Cliff GaliherCommented:
Windows *default* configuration is to block inbound ports that don't otherwise have allow rules.

445 is used for SMB, and if this machine is doing file or print sharing of any kind, 445 is needed on the internal network. So that may be a bad example to try testing. And since it *does* have an allow rule, the precedence/order of rules matters. You can create an explicit block, but if the allow rule is higher, it'll match first.
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
JohnBusiness Consultant (Owner)Commented:
I agree with Cliff and here is a supporting article.

https://support.symantec.com/en_US/article.TECH88796.html

In there is a link to a Microsoft Support article. You probably do not need to close unless you allow for all the possibilities of it being closed.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Cliff Galiher (https:#a42351345)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.