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

Routing Wireguard Clients via VPN Gateway.

Scheduled Pinned Locked Moved General pfSense Questions
10 Posts 3 Posters 911 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.
  • N
    NeoDude
    last edited by Oct 22, 2022, 5:25 PM

    Wasn't sure of the best category for this as it covers a few areas...

    Ok, so I currently have a Wireguard server set up in PfSense which allows me to access my home network as well as use my home internet connection while away from home using my phone and/or laptop. All runs fine.

    I also run 2 OpenVPN and 1 Wireguard Client, all connected to NordVPN in a Gateway Group (WG being Tier 1 and OpenVPN being Tier 2). I have an Alias list set up for clients that I want to use this Gateway group as well as rules on each interface to route this Alias list via the Nord Gateway group. All runs fine.

    What I would like to set up, is when connecting to my home network via Wireguard, instead of just using my Home internet connection, I'd like to route the traffic from my phone also via the Nord Gateway Group. In this way I get the best of both worlds, access to my home network, but also internet access via Nord, all through a single VPN connection.

    I had assumed this would just be as easy as adding my Phone's Wireguard IP address to the Alias list and add the same rules to the WG0 tab the same way as I do on any other interface. Unfortunately, after having tried this, my Phone still appears to be connecting to the internet via the Default Gateway.

    Has anybody done anything similar? Any ideas where to begin diagnosing my issue? Thanks in advance :)

    Home Server "Gandalf":  unRAID Pro 6 | MB**:**  ASUS Z9PE-D8 WS | CPU:  Dual Xeon E5-2670 | RAM:  64GB Crucial PC-1600 ECC

    B 1 Reply Last reply Oct 22, 2022, 5:59 PM Reply Quote 0
    • B
      Bob.Dig LAYER 8 @NeoDude
      last edited by Oct 22, 2022, 5:59 PM

      @neodude You need to do the outbound NAT on the OpenVPNs clients now for the WG Subnet too.

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Oct 22, 2022, 6:18 PM

        If your policy routing rule on the Wireguard interface is correct I would expect that to work. Make sure it's actually matching the traffic there and not on some other rule.

        Steve

        1 Reply Last reply Reply Quote 1
        • N
          NeoDude
          last edited by Oct 22, 2022, 8:33 PM

          Managed to get this running. I noticed that I also had a "Wireguard" Tab under firewall rules. I moved my rules from "WG0" to "Wireguard" and everything works perfectly. Still confused as to why there are 2 tabs though. '"WG0" shows in Interface Assignments but "Wireguard" does not.

          Home Server "Gandalf":  unRAID Pro 6 | MB**:**  ASUS Z9PE-D8 WS | CPU:  Dual Xeon E5-2670 | RAM:  64GB Crucial PC-1600 ECC

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Oct 23, 2022, 1:45 PM

            'Wireguard' is an interface group. WG0 is a member of that group. Firewall rules on interface groups are parsed first.

            Steve

            N B 2 Replies Last reply Oct 23, 2022, 2:01 PM Reply Quote 1
            • N
              NeoDude @stephenw10
              last edited by Oct 23, 2022, 2:01 PM

              @stephenw10

              Yep, I see it now in interface groups. Is this created automatically when a Wireguard interface is created? It doesn't show as having WG0 as a member, despite acting like it does.

              Home Server "Gandalf":  unRAID Pro 6 | MB**:**  ASUS Z9PE-D8 WS | CPU:  Dual Xeon E5-2670 | RAM:  64GB Crucial PC-1600 ECC

              1 Reply Last reply Reply Quote 0
              • B
                Bob.Dig LAYER 8 @stephenw10
                last edited by Bob.Dig Oct 23, 2022, 2:03 PM Oct 23, 2022, 2:02 PM

                @stephenw10 said in Routing Wireguard Clients via VPN Gateway.:

                WG0 is a member of that group.

                Not necessarily 🤓

                @NeoDude For OpenVPN there is also a group, since forever.

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Oct 23, 2022, 2:07 PM

                  Yes, that^. It's not quite the same as a user created interface group but, yes, it is created automatically and, yes, all Wireguard tunnels are always a member of that.

                  https://docs.netgate.com/pfsense/en/latest/vpn/wireguard/rules.html#tunneled-traffic

                  Steve

                  B 1 Reply Last reply Oct 23, 2022, 3:46 PM Reply Quote 1
                  • B
                    Bob.Dig LAYER 8 @stephenw10
                    last edited by Oct 23, 2022, 3:46 PM

                    @stephenw10 said in Routing Wireguard Clients via VPN Gateway.:

                    and, yes, all Wireguard tunnels are always a member of that.

                    Wait a minute...

                    Screenshot 2022-10-23 174443.png

                    1 Reply Last reply Reply Quote 0
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Oct 23, 2022, 4:20 PM

                      Huh, interesting I missed that. 👍

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