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

  • 1
    Wouldn't this be better asked on Super User since it's basically a Windows Admin question?
    – hardillb
    Feb 22, 2017 at 9:08
  • 3
    @hardillb I have thought of that. But decided otherwise as I want to modify a specific mosquitto rule. I would like people to use this site when they want to set up a whitellist for their mosquitto broker. We already have a lot of question about mosquitto. I know, it is an overlapping question but I think it can get along. Feb 22, 2017 at 9:13
  • 1
    There is nothing special about the mosquitto rule, it's just listening on a TCP port
    – hardillb
    Feb 22, 2017 at 10:02

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.