5

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.

  1. Open Windows Firewall With Advanced Security from Start.
  2. Select Inbound Rules from the list on the left.
  3. Search for the rules called "mosquitto" there are 2-2 for TCP and UDP. (I do not know why there are two for each.)
  4. Open Properties of the mosquitto TCP rule.
  5. 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.

Picture of windows firewall error message reporting wrong parameter

  1. 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?

Helmar
  • 8,450
  • 6
  • 36
  • 84
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90

1 Answers1

5

Could you make custom rule by typing the ports (1883 and 8883) and allowing separately with different rules both UDP and TCP on these ports.

See: https://technet.microsoft.com/en-us/library/cc947814(v=ws.10).aspx

This post says you need the described hack that did not work in your case to change the defaults by program name.

mico
  • 4,351
  • 1
  • 18
  • 27