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

    Routing Internet Traffic Through A Site-To-Site Wireguard tunnel

    Scheduled Pinned Locked Moved WireGuard
    5 Posts 3 Posters 1.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.
    • F
      freenode
      last edited by

      Hi Guys!
      I would like to create same topology like this topic: link

      But I want use wireguard for this.

      The topology:
      link

      The connection is works. The ping is works. The question, how can I force the traffic from 192.168.40.0/24 through VIA the GW tunnel. The target, on the whoer.net or whatismyip.com show my vps provider IP not my ISP IP.

      What I need to do for this?

      I tried this:

      • assign the wiregaurd interface, and allowed all traffic on this
      • Create a gateway (192.168.70.1) - and I created firewall rules, where all traffic on LAN interface will go to new gateway, and all other traffic will be blocked (this not works)
      • create a gateway again, and use that for default gateway (not works)
      • I created outbund NAT, where the interface is the wireguard interface and all traffic from 192.168.40.0 will be translated to the wireguard tunnel (not works)

      If I connect to the pfsense where have on my vps provider via my cell phone, than works fine. The web browsing, and the to any device where on the 192.168.70.0 network.

      Can any people what is wrong on my side? I think after the NAT settings this should be works...
      A DNS resolver run both pfsense.

      Many thanks!

      B JustAnotherUserJ 2 Replies Last reply Reply Quote 1
      • B
        Bronko @freenode
        last edited by

        @freenode

        Did you find a working setup?
        I'm coming from here and would like to route the traffic from home server machines initiated generally trough Wireguard tunnel which endpoint is a pfsense on VPS server site with static IP.

        B 1 Reply Last reply Reply Quote 0
        • B
          Bronko @Bronko
          last edited by

          OK, we solved it here too...

          1 Reply Last reply Reply Quote 0
          • JustAnotherUserJ
            JustAnotherUser @freenode
            last edited by JustAnotherUser

            I know this is an old question but, I'm answering it because it seems to be a popular question

            @freenode said in Routing Internet Traffic Through A Site-To-Site Wireguard tunnel:

            The connection is works. The ping is works. The question, how can I force the traffic from 192.168.40.0/24 through VIA the GW tunnel.

            You set your SITE's Default Gateway to your WG interface:

            808410b6-cab2-4bfc-90bb-0ab120f63cb9-image.png

            B 1 Reply Last reply Reply Quote 1
            • B
              Bronko @JustAnotherUser
              last edited by

              @JustAnotherUser said in Routing Internet Traffic Through A Site-To-Site Wireguard tunnel:

              You set your SITE's Default Gateway to your WG interface

              ...WG interface on MAIN Router.
              (to be unambiguous)

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