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

    Router Advertisements (revisited)

    Scheduled Pinned Locked Moved IPv6
    12 Posts 3 Posters 7.1k 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.
    • M Offline
      mdpugh
      last edited by

      Is there no way to (for the time being) block RAs on certain interfaces?

      1 Reply Last reply Reply Quote 0
      • E Offline
        Efonnes
        last edited by

        The rule you mentioned does not have the "quick" keyword on it, so any rules below it should be able to override it.

        1 Reply Last reply Reply Quote 0
        • M Offline
          mdpugh
          last edited by

          Okay.  But the rule generated by my configuration

          block drop out log quick on em1 inet6 proto ipv6-icmp all icmp6-type routeradv

          is not blocking router advertisements on em1.  So what is wrong?

          1 Reply Last reply Reply Quote 0
          • M Offline
            mdpugh
            last edited by

            Maybe I need clarification on rule order.  According to http://doc.pfsense.org/index.php/Firewall_Rule_Basics, the first rule matched wins, which jibes with my dilemma and is the basis for my thinking the autogenerated rule was overriding my rule.  But according to http://openbsd.org/faq/pf/filter.html, it's the last rule matched that wins, which (a) agrees with what Efonne is saying, (b) makes sense in light of the quick keyword function, and © makes the most sense to me.  Yet, if the latter is the case, why isn't my rule working?

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

              Have you tried making the rule more general to see if you can get it to block? Are you logging the block?

              You could hand edit /tmp/rules.debug and move it above the other, then pfctl -f /tmp/rules.debug and see if it behaves differently.

              What you are saying about rule order is essentially right.

              The rules on our interface tabs are always first-match-wins, because they all have 'quick' set. Rules on the floating tab can work either way (depending on whether or not you have 'quick' checked on the floating rule). Some of our internal rules do not have 'quick' set so they can be overridden by user rules.

              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
              • M Offline
                mdpugh
                last edited by

                I changed the rule to read

                block drop out log on em1 inet6 all

                with no effect.  This time, though, I paid closer attention to the output of pfctl -s rules.  The offending autogenerated rule is not the one I mentioned, but instead is

                pass out quick inet6 proto ipv6-icmp from fe80::/10 to ff02::/16 icmp6-type routeradv keep state.

                How do I get around this one?

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

                  There probably isn't a way around that if it's above the user rules. databeestje will probably have to comment on that one, I don't know if there is an option or bypass for it.

                  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
                  • M Offline
                    mdpugh
                    last edited by

                    I edited /tmp/rules.debug and removed quick from this line:

                    pass out quick inet6 proto ipv6-icmp from fe80::/10 to ff02::/16 icmp6-type {128,133,134,135,136} keep state.

                    This solved my problem, but I don't know if any other rules further down (other than mine) will override this one now.  I don't see any, but I haven't exactly studied the file.  How do I make this edit persistent (assuming nothing else is broken as a result of the change).  It is, after all, just a rig until router advertisements are fixed.

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

                      Edit the line in /etc/inc/filter.inc

                      https://github.com/bsdperimeter/pfsense/blob/master/etc/inc/filter.inc#L2286

                      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
                      • M Offline
                        mdpugh
                        last edited by

                        I made this change and now have the desired functionality.  Actually, I changed the line following the one highlighted at https://github.com/bsdperimeter/pfsense/blob/master/etc/inc/filter.inc#L2286 because it is the one causing me problems.  Now that it's blocking and logging, I can confirm beyond a shadow of doubt that RAs are being sent down the gif tunnels too when not blocked.  Thanks for the assistance!  Now, I think I'll tinker with fixing the RAs.  :)

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