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

Gateway Change on Alias Not Applying

Scheduled Pinned Locked Moved Firewalling
11 Posts 2 Posters 735 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.
  • W
    wgallt
    last edited by Aug 1, 2021, 3:05 PM

    I have an alias called "VPN_Hosts" which contains IP's of hosts that will be using the OpenVPN gateway instead of the WAN. VPN interface is up, I've created the rule to change the gateway of the aliased hosts, and added the outbound NAT however the rule never gets hit and the traffic continues to use the WAN interface.

    Alias:
    dc968df8-9a78-4c9c-a436-ffcbfc461f0c-image.png

    LAN Rule:
    b4e4742c-77af-4d95-80ab-3de1ba43e22f-image.png

    Outbound NAT:
    915dd48b-0160-450a-8718-372af802f83c-image.png

    Could someone point out the obvious that I'm surely missing. Thanks.

    V 1 Reply Last reply Aug 1, 2021, 6:43 PM Reply Quote 0
    • V
      viragomann @wgallt
      last edited by Aug 1, 2021, 6:43 PM

      @wgallt said in Gateway Change on Alias Not Applying:

      I've created the rule to change the gateway of the aliased hosts

      Is this rule on the top of the LAN rule set?

      Maybe there is a floating rule or one on an interface group which your LAN is belonging to matching the traffic before.

      W 1 Reply Last reply Aug 1, 2021, 7:01 PM Reply Quote 0
      • W
        wgallt @viragomann
        last edited by Aug 1, 2021, 7:01 PM

        @viragomann
        I don't have any floating rules and yes it's towards the top below the anti-lockout rule. This is a fairly new installation. This is the first rule I'm adding and it won't match.
        56730202-e2c4-4381-8033-16113d84c91c-image.png

        V 1 Reply Last reply Aug 1, 2021, 7:05 PM Reply Quote 0
        • V
          viragomann @wgallt
          last edited by Aug 1, 2021, 7:05 PM

          @wgallt
          Also consider that already existing connections are not affected by the newly added rule. You might have to delete the states.

          W 1 Reply Last reply Aug 1, 2021, 7:40 PM Reply Quote 0
          • W
            wgallt @viragomann
            last edited by Aug 1, 2021, 7:40 PM

            @viragomann
            Thanks for the suggestion. I did clear the states a couple times before posting. Just to rule out an issue with the alias I set the source of the rule to the IP of the host, cleared the states again and still no hit on the rule.

            V 1 Reply Last reply Aug 1, 2021, 7:46 PM Reply Quote 0
            • V
              viragomann @wgallt
              last edited by Aug 1, 2021, 7:46 PM

              @wgallt
              And the VPN gateway is really shown a "up"? If it isn't (maybe cause the server doesn't respond to pings) the policy routing rule is omitted.

              Also I just saw that your outbound NAT rule isn't using the correct interface. You should change it to the VPN interface you have assigned to the client instance.

              W 1 Reply Last reply Aug 1, 2021, 8:15 PM Reply Quote 0
              • W
                wgallt @viragomann
                last edited by Aug 1, 2021, 8:15 PM

                @viragomann
                The VPN interface is up:
                a1e5bfc7-8ea6-4ca7-b343-78699249c5e2-image.png

                I thought it should point at the OpenVPN instance but I have updated the interface to the parent OPT1:
                982297fc-013a-4459-ba21-348cb923d3c4-image.png

                I cleared states and rule not hit and traffic is exiting the WAN interface.

                V 1 Reply Last reply Aug 1, 2021, 8:25 PM Reply Quote 0
                • V
                  viragomann @wgallt
                  last edited by Aug 1, 2021, 8:25 PM

                  @wgallt said in Gateway Change on Alias Not Applying:

                  The VPN interface is up:

                  No, the point is what Status > Gateway is showing for the OpenVPN gateway.

                  W 1 Reply Last reply Aug 1, 2021, 8:46 PM Reply Quote 0
                  • W
                    wgallt @viragomann
                    last edited by Aug 1, 2021, 8:46 PM

                    @viragomann
                    Ok. The Status -> Gateway shows Offline
                    3b1b6000-914c-4f8e-810d-9e9ff3ec790c-image.png

                    The OpenVPN log shows Initialization Sequence Completed and I'm assigned and IP so not sure why that would be. So this is why the rule isn't hit being that I have the "Skip rules when gateway is down" option enabled.

                    V 1 Reply Last reply Aug 1, 2021, 8:57 PM Reply Quote 0
                    • V
                      viragomann @wgallt
                      last edited by Aug 1, 2021, 8:57 PM

                      @wgallt said in Gateway Change on Alias Not Applying:

                      Ok. The Status -> Gateway shows Offline

                      So that's the problem.

                      Gateway offline doesn't necessarily mean that your VPN is not working, it tells you that to gateway does not respond to pings.

                      So you can either deactivate the gateway monitoring for the VPN gateway in System > Routing > Gateways, or if monitoring is desired, enter an alternative monitoring IP (a public IP which is responding to pings).

                      Also you can check System > Advanced > Miscellaneous > Skip rules when gateway is down if you don't want the rule to be omitted when the gateway is down.

                      W 1 Reply Last reply Aug 1, 2021, 9:36 PM Reply Quote 0
                      • W
                        wgallt @viragomann
                        last edited by Aug 1, 2021, 9:36 PM

                        @viragomann
                        Success! I set the monitoring IP to 8.8.8.8 and the rule is getting hits now and the host is definitely using the VPN for egress. Thank you!

                        1 Reply Last reply Reply Quote 0
                        1 out of 11
                        • First post
                          1/11
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received