How to block all inbound connections in wf.msc

lupinlicious 136 Reputation points
2022-04-20T05:17:07.023+00:00

Hi all,

I'm wondering how I can block all incoming connections to the server but only approve the network from my company.

This is what I have done:

  1. I have created a new inbound rule with the scope of "remote IP addresses" and added the necessary IPs I need to bee able to communicate with the server.
  2. Right clicked on the Windows Firewall Defender Firewall..
  3. Selected Properties and changed "Inbound connections "Block (default)" to "Block all connections"

With this I locked myself out :)

How can I do this?

Best regards and thaaanks!

Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,916 Reputation points
    2022-04-26T09:44:41.3+00:00

    Hi Lupinlicious,

    You can achieve this by configuring the firewall to only allow specific IP Addresses over your RDP port:

    Login to the server using RDP.

    Click on Start >> Administrative tools >> Windows Firewall with Advanced Security.

    Go to Inbound Rule >> New Rule

    Click on Custom and on the next page select All Programmes.

    You are now at Protocol & Ports wizard.

    select the Specific Port option for the Remote Port and enter the port number and click Next.

    Enter the RDP port for your server. Remote Desktop Protocol (RDP) is a Microsoft proprietary protocol that enables remote connections to other computers, typically over TCP port 3389.

    You will need to enter the Remote IP Address by which you want to connect your port.

    Click on the Add Button and enter the IP Address and click Ok and Next.

    Select Allow the connection option and click Next.

    On the Profile Page, select all three options. Domain, Private and Public.

    Click Next Button.

    In the final step, you need to provide the Name of this Rule. (eg. Remote Desktop - IP Restriction Rule)

    Click on the Finish button.

    This will allow RDP only from the specified IP address. You should then be able to create a rule like the one you have already to prevent all other connections, without blocking yourself via RDP.

    I hope this answers your question.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.