When you want to connect to the internet, you click on the Network icon to see the list of Wi-Fi networks that are in the range and available in your area. Some of them will be secured and others will not be secured connections. However, when you know the name of the connection you want to connect to, it will be unnecessary to see all the names of the neighboring Wi-Fi connections. The menu view would also look overcrowded because of this long list. Refer to the below example
In this article, let us discuss how to add and remove filters so as to block or allow certain Wi-Fi networks.
Steps to be followed :
Step 1: Press the buttons Windows+r together to open the Run window.
Step 2: Type cmd and press Ctrl+Shift+Enter together. This opens Elevated Command Prompt(Command Prompt with Admin rights)
Step 3: Our first task is to Identify the SSID or the Name of the network that we want to block.
Issue the below command to list all the Wi-Fi Networks in your area
netsh wlan show networks
Note the SSID of the network you want to block.
Alternatively, you can find the SSID of a network from the network icon in the taskbar.
- Click on the network icon
- The menu shows the SSID(Name of the network). Refer to the below image for clarity
Step 4: To block a particular Wi-Fi, run the below command:
netsh wlan add filter permission=block ssid="SSID/WiFi_Name" networktype=Infrastructure
Let’s say, we want to block dlink-C568. We should tweak the above command as follows:
netsh wlan add filter permission=block ssid="dlink-C568" networktype=Infrastructure
NOTE:
In the above method, we are adding the filter based on a Wi-Fi network name. We are not actually blocking the Wi-Fi router as such. For some reason, if the name of the Wi-fi changes, it will bypass the filter and again be shown in the list.
Step 5: To unblock a Wi-Fi connection, run the below command:
netsh wlan delete filter permission=block ssid="SSID/WiFi_Name" networktype=Infrastructure
Let’s say, we want to block dlink-C568. We should tweak the above command as follows:
netsh wlan delete filter permission=block ssid="dlink-C568" networktype=Infrastructure
Some important commands that you might need:
1. To see the list of blocked Wi-Fi networks in your system, issue the below command :
netsh wlan show filters
2. If you want to block all the other Wi-Fi networks. Meaning, you want to allow only your network. You can do so by running the below commands:
netsh wlan add filter permission=allow ssid="SSID/WiFi_Name" networktype=infrastructure netsh wlan delete filter permission=denyall networktype=infrastructure
For example, if you want to allow your network named My Wifi Network and deny all other networks, run the below commands:
netsh wlan add filter permission=allow ssid="My Wifi Network" networktype=infrastructure netsh wlan delete filter permission=denyall networktype=infrastructure
That’s All. We hope this has helped. Thank you for Reading.