Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    ICMP Codes

    Scheduled Pinned Locked Moved Firewalling
    9 Posts 3 Posters 4.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gridrun
      last edited by

      Hi,

      Is there a way to set ICMP codes in firewall rules? Like, filtering just Dest. Unreachable (Fragmentation Needed) for example?

      Tech stuff on my blog: http://niston.wordpress.com

      1 Reply Last reply
      Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        If you set a rule's protocol to ICMP you get a drop-down to select the ICMP type that the rule will match.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply
        Reply Quote 0
        • G
          gridrun
          last edited by

          @gridrun:

          Hi,

          Is there a way to set ICMP codes in firewall rules? Like, filtering just Dest. Unreachable (Fragmentation Needed) for example?

          Types != Codes :)

          Tech stuff on my blog: http://niston.wordpress.com

          1 Reply Last reply
          Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            In that case, no, not in our GUI. pf can do it we just don't have a way to enter them in the GUI.

            (Most people confuse the codes/types โ€“ safer to assume people meant types)

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply
            Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              So you want specific to be really specific, say type 3 (dest unreach) code 2 protocol unreach while code 3 would mean port unreachable, 4 frag needed but dont frag set sort of codes.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 26.07 | Lab VMs 2.9.0, 26.07

              1 Reply Last reply
              Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                That sounds nice in theory but IIRC in reality if those packets are actually part of a connection pf would allow them, they wouldn't be considered "new" for evaluation by firewall rules, they'd be part of the connection state. (could be misremembering that, worth double checking, but I lack the time to do so at the moment)

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply
                Reply Quote 0
                • G
                  gridrun
                  last edited by

                  @johnpoz:

                  So you want specific to be really specific, say type 3 (dest unreach) code 2 protocol unreach while code 3 would mean port unreachable, 4 frag needed but dont frag set sort of codes.

                  yep. I envision a nice drop down style selector for the code as well, including "any". I reckon the GUI would be sorta complex because code meanings vary with types. But it would allow for finer control over ICMP traffic and complete icmp filtering functionality. Of course it can't be added if the underlying packet filter doesn't support filtering by type&code.

                  Tech stuff on my blog: http://niston.wordpress.com

                  1 Reply Last reply
                  Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    patches accepted :-)

                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply
                    Reply Quote 0
                    • G
                      gridrun
                      last edited by

                      @jimp:

                      patches accepted :-)

                      coolio! :-D

                      Tech stuff on my blog: http://niston.wordpress.com

                      1 Reply Last reply
                      Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better ๐Ÿ’—

                      Register Login
                      • First post
                        Last post
                      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                      Privacy Policy · Cookie Policy