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

    NAT broken after Reboot

    Scheduled Pinned Locked Moved NAT
    14 Posts 3 Posters 587 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.
    • I
      iggybuddy6 @pst
      last edited by

      @pst

      "The misconception that WireGuard inevitably generates logs is probably based on the fact that, by default, it requires a static (and therefore identifiable) connection between the VPN app and the VPN server. To get around this, we hardcoded our apps to begin every WireGuard VPN connection using the same internal IP address (10.2.0.2).

      To allow more than two people to be connected to the same VPN server at the same time on WireGuard, we use double network address translation (NAT) to dynamically provision sessions.

      This means when your app connects to one of our VPN servers via WireGuard, the first NAT will rewrite the 10.2.0.2 IP address to a random but unique internal IP address that is assigned to your session. From this point on, WireGuard works like any other VPN: The second NAT rewrites your session IP address again to the VPN serverโ€™s public IP address before it connects to your desired website."
      wireguard-privacy

      P 2 Replies Last reply Reply Quote 0
      • P
        pst @iggybuddy6
        last edited by

        @iggybuddy6 yup, just found those pages...

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

          @iggybuddy6 said in NAT broken after Reboot:

          Hence I can not use the "normal way" to add multiple Wireguard

          You can. Just don't use 10.2.0.2. Use 10.2.0.3 and so on. And use that IP also as the gateway.

          I 1 Reply Last reply Reply Quote 0
          • I
            iggybuddy6 @Bob.Dig
            last edited by iggybuddy6

            @Bob-Dig
            How do you mean? The VPN provider tells what the Internal IP address is. If proton always uses 10.2.0.2 I can not simply choose another IP.

            I do not think you ever tried to add multiple Proton VPN connections to your pfsense.
            I think we are diverging a bit from the real issue. As I said my setup is working up until I restart the Netgate. After that I need to add a fake Wireguard tunnel to make it work again. Something is off with the behavior ...

            Bob.DigB 1 Reply Last reply Reply Quote 0
            • P
              pst @iggybuddy6
              last edited by

              @iggybuddy6 There is another approach suggested in that reddit thread, a comment by CounterI four months ago: https://www.reddit.com/r/ProtonVPN/comments/127zpbe/comment/mi1mq2x/

              They ended up not doing 1:1 NAT but added another set of interfaces and NATed those ๐Ÿค” (you better read that comment)

              Maybe that is a cleaner solution?

              (fwiw, I've reached my daily goal of learning something new every day ๐Ÿ˜„ )

              I 2 Replies Last reply Reply Quote 0
              • Bob.DigB
                Bob.Dig LAYER 8 @iggybuddy6
                last edited by Bob.Dig

                @iggybuddy6 said in NAT broken after Reboot:

                I do not think you ever tried to add multiple Proton VPN connections to your pfsense.

                You are right, I must have confused this with another VPN-Provider. I am using OpenWRT-VMs for all my Proton-WG-tunnels.

                Screenshot 2025-07-17 204423.png

                I 1 Reply Last reply Reply Quote 0
                • I
                  iggybuddy6 @pst
                  last edited by

                  @pst I will definitely check this. Thx a lot for pointing that out!

                  1 Reply Last reply Reply Quote 1
                  • I
                    iggybuddy6 @Bob.Dig
                    last edited by

                    @Bob-Dig Sure np.
                    I was thinking a high level details NAT debug after after reboot and after fixing the problem adding dummy tunnel would trigger an answer pointing me to some known behavior and fix

                    1 Reply Last reply Reply Quote 0
                    • I
                      iggybuddy6 @pst
                      last edited by

                      @pst I have tried a couple of wireguard connections using that alternative method and it seems to be working without the need of NAT 1:1 !!!
                      It looks good so far after rebooting. Thank you so much for pointing out that comment. I have spent so much time and this definitely should make the setup more reliable

                      You saved me so much time and from a massive headache I can not thank you enough ๐Ÿ˜˜ ๐Ÿ˜˜ ๐Ÿ˜˜

                      P 1 Reply Last reply Reply Quote 1
                      • P
                        pst @iggybuddy6
                        last edited by

                        @iggybuddy6 I'm just happy I could help. Today I went from thinking I knew everything about setting up wg on pfSense, to realising I did not, and that is a great reward in itself!

                        Hopefully your setup will remain stable going forward.

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