Has anyone got this Firewall recipe to work

"For a firewall to support LwM2M , it should be configured to allow outgoing UDP packets to destination port 5683 (other ports can be configured), and a llow incoming UDP packets back to the source address/port of the outgoing UDP packet for a period of at least 240 seconds."

from section 8.2.1. at this URL


The first part is easy, but the incoming packets?

We are looking for IPTABLES recipes, but any positive experience with ANY firewall will be helpful.

  • In general a stateful firewall will automatically allow RELATED traffic and after an outgoing connection is established the return packets will be allowed into your network and a bi-directional connection is established.
    – HBruijn
    Jun 14, 2018 at 13:04
  • This is over UDP. There is no connection. Jun 14, 2018 at 13:16
  • 1
    Yes. UDP is connectionless, and I should probably have used hyphens around the word "connection" but that does not negate the fact that in iptables accepting RELATED traffic will also work for UDP. (For instance for the most widely used UDP protocol, DNS resolution, you typically don't explicitly open up incoming port 53 to receive answers to the DNS queries you send out).
    – HBruijn
    Jun 14, 2018 at 13:56
  • 1
    Investigating serverfault.com/questions/123208/… Jun 14, 2018 at 14:19


Your Answer

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

Browse other questions tagged or ask your own question.