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

    host in alias used by firewallrule refuses to work

    Scheduled Pinned Locked Moved General pfSense Questions
    22 Posts 4 Posters 1.7k 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.
    • A
      a1aba
      last edited by

      I have a VPN gateway and use an alias (VPN_Clients) to send hosts to that gateway, it works properly.
      But when adding one specific host to that alias it doesn't work for that one host, the other in the alias do get to the VPN gateway
      When i remove the alias from the firewall rule (and send all my hosts using the "any" as source setting) it will use the VPN gateway. (all the hosts, also the one not working in the alias)

      Troublehhooting so far;
      new IP for affected host (UTP connected)
      switched to WiFi adapter (turned NIC off)
      created new alias, tested with the one host in it, akso doesn't work
      reset ARP states

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @a1aba
        last edited by

        @a1aba Create a rule for just that IP and see if it matches?

        https://docs.netgate.com/pfsense/en/latest/troubleshooting/firewall.html#new-rules-are-not-applied

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        A 1 Reply Last reply Reply Quote 0
        • A
          a1aba @SteveITS
          last edited by

          @SteveITS thanks for helping!
          created a separate rule and moved it to the top position (below anti lockout rule) and reloaded the rules
          same problem

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @a1aba
            last edited by

            @a1aba Then either itโ€™s not being loaded (see doc) or it isnโ€™t matching. IPv6? UDP vs TCP?

            Show your rule?

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

            A 1 Reply Last reply Reply Quote 0
            • A
              a1aba @SteveITS
              last edited by

              @SteveITS ! 2025-02-23_200002.jpg

              S 1 Reply Last reply Reply Quote 0
              • S
                SteveITS Galactic Empire @a1aba
                last edited by

                @a1aba On the LAN page of rules does it show 0/0 or have a count? (tells you if it's matching)

                Does a filter reload show any errors?

                Is IPv6 in use?

                Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                Upvote ๐Ÿ‘ helpful posts!

                A 1 Reply Last reply Reply Quote 0
                • A
                  a1aba @SteveITS
                  last edited by

                  @SteveITS 2025-02-23_205938.jpg
                  No IPV6 in use (turned it off on client NIC)

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    SteveITS Galactic Empire @a1aba
                    last edited by

                    @a1aba The โ€œ6/โ€œ means 6 open states/connections for that rule. In theory you can click on it and see them but it doesnโ€™t seem to work for me.

                    So, why do you think itโ€™s not working?

                    Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                    When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                    Upvote ๐Ÿ‘ helpful posts!

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      a1aba @SteveITS
                      last edited by a1aba

                      @SteveITS i check the client using ipchicken.com or whatsmyip.org or similar sites to check the IP shown there.
                      All other hosts (used in the alias) get the VPN IP but this client always gets my true external IP
                      Only when changing the firewall rule so all trafic is routed to the vpn gateway, this client will get a VPN IP

                      that is not working as i expect it

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by stephenw10

                        So if fails both adding a specific rule or adding it to the alias?

                        You are just adding that host as an IP address to the alias?

                        Do you have any floating rules that might be passing that client?

                        G A 2 Replies Last reply Reply Quote 0
                        • G
                          Gblenn @stephenw10
                          last edited by

                          @stephenw10 @a1aba Besides some other rule superseeding this one, could it be sticky states playing into this?
                          If so, going to Diagnostics > States and filter on that IP 172.16.33.43 and then kill all states. Or go all in and simply kill all states for all connections...

                          Another possibility could be multiple IP's for that client? Does it have more than one port, or wifi connected in parallell?

                          A stephenw10S 2 Replies Last reply Reply Quote 0
                          • A
                            a1aba @stephenw10
                            last edited by

                            @stephenw10 Yes, it fails both adding a specific rule or adding it to the alias
                            it's added by it;s IP address and there is no floating rule

                            1 Reply Last reply Reply Quote 0
                            • A
                              a1aba @Gblenn
                              last edited by

                              @Gblenn killed all states earlier, no solution
                              only 1 connection active on that host
                              for troubleshooting tested it on NIC and WiFi (perhaps MAC related, but the same issue)

                              G 1 Reply Last reply Reply Quote 0
                              • G
                                Gblenn @a1aba
                                last edited by Gblenn

                                @a1aba said in host in alias used by firewallrule refuses to work:

                                @Gblenn killed all states earlier, no solution
                                only 1 connection active on that host
                                for troubleshooting tested it on NIC and WiFi (perhaps MAC related, but the same issue)

                                Ok so I suppose it got a different IP on wifi right? And you changed the rule to match the new IP?
                                Also, when you checked the IP on the host, did you check with ipconfig /all (assuming windows)? I mean an application can generate an additional connection...

                                A 1 Reply Last reply Reply Quote 0
                                • A
                                  a1aba @Gblenn
                                  last edited by

                                  @Gblenn yep, tried it all
                                  strange thing is if delete the alias from the rule and change it to "any" as source it does work and the hosts gets the VPN IP (ipchicken.com to chech that)

                                  G 1 Reply Last reply Reply Quote 0
                                  • G
                                    Gblenn @a1aba
                                    last edited by Gblenn

                                    @a1aba said in host in alias used by firewallrule refuses to work:

                                    @Gblenn yep, tried it all
                                    strange thing is if delete the alias from the rule and change it to "any" as source it does work and the hosts gets the VPN IP (ipchicken.com to chech that)

                                    Yes that is really strange... and is the result the same if you use "LAN subnet" instead of any as the source?

                                    Btw, do you have IPv6 enabled in pfsense?

                                    A 1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator @Gblenn
                                      last edited by

                                      @Gblenn said in host in alias used by firewallrule refuses to work:

                                      Besides some other rule superseeding this one, could it be sticky states playing into this?

                                      It would be unlikely for a connection to, say, ipchicken.com. A TCP/https connection like that would be new each time you opened or refreshed the page and should use the new rules to create new states.

                                      Open a state by starting a ping. Then check the states to see what rule opened that: pfctl -vvss

                                      Then check the ruleset to see what rule that is: pfctl -vvsr

                                      It's either not matching your new rule or getting matched by some other rule before it reaches it.

                                      Or it's not loading your new rule at all. Make sure Status > Filter Reload returns clean.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        SteveITS Galactic Empire @stephenw10
                                        last edited by

                                        OP's screen cap above shows open states on the rule. (I assume the .43 is the desired client IP, didn't reread this thread)

                                        The third rule should block all other traffic as long as .43 is in the VPN alias. (it also has 10kb traffic)

                                        @a1aba Do you have "Do not create rules when gateway is down" checked?
                                        https://docs.netgate.com/pfsense/en/latest/multiwan/policy-route.html#enforcing-gateway-use

                                        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                                        Upvote ๐Ÿ‘ helpful posts!

                                        A 1 Reply Last reply Reply Quote 1
                                        • A
                                          a1aba @Gblenn
                                          last edited by

                                          @Gblenn no IPV6 in pfsense and none configured on client

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            a1aba @SteveITS
                                            last edited by

                                            @SteveITS said in host in alias used by firewallrule refuses to work:

                                            OP's screen cap above shows open states on the rule. (I assume the .43 is the desired client IP, didn't reread this thread)

                                            The third rule should block all other traffic as long as .43 is in the VPN alias. (it also has 10kb traffic)

                                            @a1aba Do you have "Do not create rules when gateway is down" checked?
                                            https://docs.netgate.com/pfsense/en/latest/multiwan/policy-route.html#enforcing-gateway-use

                                            turned the setting on and it worked
                                            deleted the rule for the .43 address and disabled WiFi and enabled the NIC and updated the alias with the NIC ip address and it keeps working now

                                            turned the setting off (it was never on to begin with) again and it keeps on working now

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