Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    ICMP rules

    Scheduled Pinned Locked Moved Firewalling
    10 Posts 5 Posters 3.9k 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.
    • JKnottJ
      JKnott
      last edited by

      Some people think that ICMP should be blocked by a firewall, even though some message types should be allowed for proper operation of the Internet.  What ICMP types does pfSense allow or block, by default?

      tnx jk

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      1 Reply Last reply Reply Quote 0
      • K
        kpa
        last edited by

        On WAN everything including any ICMP is blocked on inbound. On the outbound direction everything is allowed by default. On LAN everything is allowed by default and on any OPT interface everything is blocked on inbound if there are no rules on the interface.

        Trying to hide your system by blocking incoming ICMP doesn't quite work contrary to the myths, any time you make an outgoing connection there will be numerous hosts on the way that now know of your precence no matter how well you block incoming connections.

        1 Reply Last reply Reply Quote 0
        • JKnottJ
          JKnott
          last edited by

          Quite so.  That's why I think blocking ICMP types such as ping, destination unreachable, source quench etc. is dumb, though I could see blocking redirects on a WAN port.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

          1 Reply Last reply Reply Quote 0
          • N
            NOYB
            last edited by

            I block that which is not needed.  It appears that ICMP of any type inbound on WAN is not needed here.  So it is blocked.

            Entities along the path are not what most people who block ICMP are trying to be invisible to.

            1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott
              last edited by

              It appears that ICMP of any type inbound on WAN is not needed here.  So it is blocked.

              What about packet too big (type 2) or destination unreachable (2)?  Seems to me, both of those would be useful.  The packet too big might occur, if you have to pass through a tunnel of some sort, where the MTU might be just 1280 bytes, but your MTU is set to 1500.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • JKnottJ
                JKnott
                last edited by

                On WAN everything including any ICMP is blocked on inbound.

                I just did a quick test and see both destination and time exceeded messages are passed, in both IPv6 and IPv4 (via NAT).

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

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

                  huh? There is no traffic passed unsolicated inbound via nat.  Ipv6 would have to be allowed.  Outbound sure the default outbound is any any so you would get responses.  If your using an ipv6 tunnel you would have to put rules in place to allow the traffic you want inbound and outbound, etc.

                  How exactly are you testing this?  There are certain aspects of ipv6 icmp that are allowed in hidden rules since there are many requirements for icmpv6 for ipv6 to function correctly.

                  I have specific rules on my wan ipv4 to allow icmp echo request since I like to be able to ping my public IP when I am remote.. Until pfblocker blew up with memory issues I had top 20 countries blocked same with icmpv6 inbound through my he tunnel.

                  I also send rejects to the udp ports used for traceroute in linux and allow those ports through in ipv6 so I can get complete traceroutes without issues remote, etc.

                  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 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • JKnottJ
                    JKnott
                    last edited by

                    My mistake,  I forgot that ICMP in response to existing traffic would normally be allowed.  I was just running traceroute to IPv4 and IPv6 sites and watching with wireshark.  I suppose I should try something like icmpush, on Linux, to properly test this.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • B
                      bimmerdriver
                      last edited by

                      I have rules to pass echo request enabled for both ipv4 and ipv6. That way ping tests work. I also had to enable an inbound firewall rule for icmp6 echo request on my windows 10 pc.

                      1 Reply Last reply Reply Quote 0
                      • N
                        NOYB
                        last edited by

                        @JKnott:

                        It appears that ICMP of any type inbound on WAN is not needed here.  So it is blocked.

                        What about packet too big (type 2) or destination unreachable (2)?  Seems to me, both of those would be useful.  The packet too big might occur, if you have to pass through a tunnel of some sort, where the MTU might be just 1280 bytes, but your MTU is set to 1500.

                        Not having any troubles with it.  Like I said

                        It appears that ICMP of any type inbound on WAN is not needed here.  So it is blocked.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.