I am trying to set up IP whitelisting for my Mosquitto broker on Windows 7. To do so I have performed the following steps, based on this article: How to Whitelist Your IP - Windows Dedicated.
- Open Windows Firewall With Advanced Security from Start.
- Select Inbound Rules from the list on the left.
- Search for the rules called "mosquitto" there are 2-2 for TCP and UDP. (I do not know why there are two for each.)
- Open Properties of the mosquitto TCP rule.
- On the Scope tab, on Local IP address section select the These IP addresses and add the specific IP address. 192.168.1.5 in my case.
First I have received the following error.
- To solve it, the Edge traversal settings has to be modified on the Advanced tab. I have changed it from "Defer to user" to "Block edge traversal."
Conclusion. It does not work, I cannot connect to the broker from the 192.168.1.5 address. It is all the same if I select the "Allow edge traversal" option.
Once I switch back to the "Any IP address" my client connects without any problem.
What's wrong?