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

    [Guide] Setup a wireguard tunnel to VPN provider (multiple VPN tunnel setup)

    Scheduled Pinned Locked Moved WireGuard
    15 Posts 4 Posters 8.5k Views 6 Watching
    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.
    • L Offline
      LaUs3r @philjoyal
      last edited by

      @philjoyal, do you allow NAT Outbound traffic for your Wireguard Client addresses via the Wireguard Gateway?

      In Firewall > NAT > outbound you should have something like:

      Interface................Source..................NAT Address
      WG_VPN............10.200.0.5/24...............WG_VPN

      Can you maybe post a picture of your NAT Outbound rules?

      P 3 Replies Last reply Reply Quote 0
      • P Offline
        philjoyal @LaUs3r
        last edited by

        @LaUs3r here are some screenshos:

        Screenshot from 2025-02-10 17-13-051.png

        Screenshot from 2025-02-10 17-13-551.png

        Screenshot from 2025-02-10 17-14-511.png

        L 1 Reply Last reply Reply Quote 0
        • P Offline
          philjoyal @LaUs3r
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • L Offline
            LaUs3r @philjoyal
            last edited by

            You probably need to add a static route for your WireGuard Remote Clients VPN subnet (10.200.0.5) to use the WireGuard ISP VPN (WG_VPN)

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              philjoyal @LaUs3r
              last edited by philjoyal

              @LaUs3r
              Screenshot from 2025-02-10 17-27-531.png

              Screenshot from 2025-02-10 17-28-041.png

              1 Reply Last reply Reply Quote 0
              • P Offline
                philjoyal @LaUs3r
                last edited by

                @LaUs3r Doesn't seems to work either

                L 1 Reply Last reply Reply Quote 0
                • L Offline
                  LaUs3r @philjoyal
                  last edited by

                  @philjoyal but that's not showing a static route. You need to add one in the routing tab.
                  Check out this guide: https://jarrodstech.net/fix-pfsense-remote-wireguard-vpn-clients-access-to-wireguard-site-to-site-vpn/

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    philjoyal @LaUs3r
                    last edited by

                    @LaUs3r the static route is shown in the 3rd screenshot

                    1 Reply Last reply Reply Quote 0
                    • P philjoyal referenced this topic on
                    • G Offline
                      Gammon
                      last edited by

                      I found this guide years ago. This was back before there were any pfsense VPN guides on the internet. The site has since gone down, but is still on the WayBackMachine. There is a brief explanation of the Wireguard MTU and MSS and how they relate to each other.

                      DevinMadeThat - Guide: Adding Proton VPN with WireGuard to pfSense

                      Excerpt:

                      • MTU: 1420
                        Maximum Transmission Unit: Because of WireGuard's overhead, you want to set it for 1420
                      • MSS: 1420
                        Maximum Segment Size: You want this clamped to 1380, but it's calculated minus 40 (for 40 bytes of v4 header) from whatever you type here. So you want to enter 1420 (1420-40=1380)
                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        privatenetworks
                        last edited by

                        This was a great post to get me started with a dual VPN solution - thanks so much for the write up @LaUs3r . For my use case I desire a wireguard primary interface and a failover wireguard connection if primary goes down or has high latency. I finally got both set up, handshaking and passing traffic.

                        I'm probably a bit over my head here and did a lot of trial and error to get things going so sorry if stupid question but once thing still isn't working for me correctly. wg0 and wg1 are both passing traffic like a round robin load balance situation - each successive connection alternates which one is being used - but that isn't the behavior I want.

                        I want to only send traffic to wg1 if wg0 fails (or gets high letency and packet loss). I created a gateway for each and a gateway group. In the gw group I have wg0 as Tier 1 and wg1 as Tier 2 but they seem to be treated equal. I also created an interface group for my NAT rules that contains VPN1(wg0) and VPN2(wg1)

                        I think I am missing what rules/process steers the traffic to the gateway group and how the NAT works and maybe somehow I'm sending traffic to both gateways ignoring the group tier and priority.

                        Any ideas where I should look in more detail to figure this out?

                        TIA

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