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

    Routing internet traffic over WG to a different firewall

    Scheduled Pinned Locked Moved Firewalling
    12 Posts 4 Posters 763 Views 3 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.
    • J Offline
      Jesper 1
      last edited by

      @jlw52761 Hi and thanks for your reply.

      I already have an outbound NAT rule on firewall B for the subnet that the client gets when logged in to the openvpn server like this:

      Interface: WAN
      Source - Network 10.10.50.0/24
      Destination: Any

      On Firewall A (the one with the openvpn server) there are no outbound NAT rules, but maybe there should be?

      V 1 Reply Last reply Reply Quote 0
      • V Offline
        viragomann @Jesper 1
        last edited by

        @Jesper-1
        Did you set the "allowed IPs" in the peer to pass any?

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          Jesper 1 @viragomann
          last edited by

          @viragomann
          The 10.10.50.0/24 subnet is added to firewall Bs peer list. But I don't see any option to select Any, it's just a list of subnets that is allowed through the peer.

          V 1 Reply Last reply Reply Quote 0
          • V Offline
            viragomann @Jesper 1
            last edited by

            @Jesper-1
            State "0.0.0.0/0" (= any) to make WG accept the forwarded access from public sources.

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              Jesper 1 @viragomann
              last edited by

              @viragomann
              Is that really correct? My interpretation of what I put in the Firewall B peer allowed IP list, is the source list of subnets that I allow from Firewall A.

              Would not putting 0.0.0.0 there only mean that I allow everything from the source?

              I'm leaning more towards that this is about a routing problem on firewall A. Looking at the routing table, there is no route for the packages to get to firewall B. And I don't know how to set up a static route, since I can only have one default route right?

              V Bob.DigB 2 Replies Last reply Reply Quote 0
              • V Offline
                viragomann @Jesper 1
                last edited by

                @Jesper-1
                Oh! I think, I've mixed some threads. I reread your intention now.
                You only want to pass the OpenVPN clients to B.
                So it should be sufficient to have the OpenVPN tunnel network in the allowed IPs at B.
                Presumably this is 10.10.50.0/24, which you said, you have this set already. So I'd expect that the packets are passed.

                J 1 Reply Last reply Reply Quote 0
                • Bob.DigB Offline
                  Bob.Dig LAYER 8 @Jesper 1
                  last edited by

                  @Jesper-1 0.0.0.0/0 in the a config I think.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jesper 1 @viragomann
                    last edited by Jesper 1

                    @viragomann No problem. Do you think there is a way to solve this? Like how do I make a route on A to get all internet traffic to get routed via B? Maybe it's something in the openvpn config? As in a push route or so in the client specific overrides? Maybe I could somehow push a default route there?

                    V 1 Reply Last reply Reply Quote 0
                    • V Offline
                      viragomann @Jesper 1
                      last edited by

                      @Jesper-1
                      In the OpenVPN config you can only set "Redirect gateway", but I guess, this is done already.

                      To route the traffic, you need a policy routing rule on the OpenVPN interface with the remote WG endpoint as gateway.

                      And If the VPN tunnel is added to the "allowed networks" in the WG settings at B, I'd expect that you see the packets from the VPN clients at the WG interface then.

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jesper 1 @viragomann
                        last edited by

                        @viragomann
                        Yes that's what I'd expect as well :)

                        I have done all of this, the packages never reaches the other side of the WG tunnel.

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