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

WireGuard multiple client bug

Scheduled Pinned Locked Moved pfSense Packages
wireguard
20 Posts 6 Posters 3.2k 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.
  • B
    bbusa @MoonKnight
    last edited by Nov 6, 2021, 7:34 AM

    @ciscox using different endpoints are basically creating different servers for different clients.

    My whole point was that one server should be able to communicate with multiple clients at the same time using the same receiving port.

    1 Reply Last reply Reply Quote 0
    • B
      bbusa @boessi
      last edited by Nov 6, 2021, 7:38 AM

      @boessi yes that’s exactly the “bug” I have encountered too.

      1 Reply Last reply Reply Quote 0
      • B
        bbusa @psp
        last edited by Nov 6, 2021, 7:41 AM

        @psp do you have them all working at the same time too?

        P 1 Reply Last reply Nov 6, 2021, 1:16 PM Reply Quote 0
        • P
          psp @bbusa
          last edited by Nov 6, 2021, 1:16 PM

          @bbusa
          Yes, but I need (according to my config) to identify any road warrior device with its own IP in order to define different rules and to route VPN traffic only for defined subnets (i.e. no 0.0.0.0/0).

          1 Reply Last reply Reply Quote 0
          • A
            ahking19 @boessi
            last edited by Nov 6, 2021, 7:53 PM

            @boessi the peer endpoint should be your WAN IP not private IP space like you are using - 10.0.0.x.

            It is not the same address space as your tunnel address/assignment.

            B 1 Reply Last reply Nov 6, 2021, 8:25 PM Reply Quote 0
            • B
              boessi @ahking19
              last edited by Nov 6, 2021, 8:25 PM

              @ahking19 the configuration is working from inside and outside the network, the configuration on the phone is using the wan ip as normal. the internal ip's are the internal peer ip's and thats like in all the guids I can find. The problem is only that just one of the config is working (the newest) as soon as I delete the newest one the one that is currently not working is working again. everything up until the handshake is woriking but then nothing happens. maybe good to point out, I had a working peer for a longer time, then I added a second peer that worked too, but since then my previous peer was not working anymore up to the point where I delete the newer peer and the old config started to work again.

              Client Config (not working after creating the iPhone Peer that is working)

              [Interface]
              PrivateKey = aM7J.......
              ListenPort = 51820
              Address = 10.0.0.20/24
              DNS = 10.0.0.1
              
              [Peer]
              PublicKey = fRz1.....
              AllowedIPs = 0.0.0.0/0, ::/0
              Endpoint = wan.dns.tld:51820
              
              

              So the address is in the range of ther internal interface. The exact same configuration for the other peer is working (up until creating a new peer configuration).

              The configuration is nothing special and as said, one peer is always working, but just the newest created peer.

              B 1 Reply Last reply Nov 6, 2021, 8:41 PM Reply Quote 0
              • B
                boessi @boessi
                last edited by Nov 6, 2021, 8:41 PM

                Server Config

                [Interface]
                PrivateKey = KGqqu.....
                ListenPort = 51820
                
                # Peer: Windows
                [Peer]
                PublicKey = uiYic...
                AllowedIPs = 0.0.0.0/0
                
                # Peer: iPhone
                [Peer]
                PublicKey = ZWTd...
                AllowedIPs = 0.0.0.0/0
                
                1 Reply Last reply Reply Quote 1
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Nov 9, 2021, 2:55 PM

                  On the "server" you do not put 0.0.0.0/0 into allowed IPs. That doesn't tell the server which networks that the client can reach. It tells the server which address belongs to the client.

                  For the client to reach anything you put the 0.0.0.0/0 in the client's allowed IPs list. On the server you put the IP address assigned to that client.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  B 1 Reply Last reply Nov 9, 2021, 3:34 PM Reply Quote 1
                  • B
                    boessi @jimp
                    last edited by boessi Nov 9, 2021, 3:42 PM Nov 9, 2021, 3:34 PM

                    @jimp ok, so the server config is a extract from the file system, I only use the package interface and as every guide mentioned to put 0.0.0.0/0 into the peer config I just do that :) . Will try to put the client ip (10.0.0.20/32) into it and will try again.

                    1 Reply Last reply Reply Quote 0
                    • B
                      boessi
                      last edited by Nov 9, 2021, 6:48 PM

                      @jimp thx for the hint it's working now, it totally make sense now. hope it will you @bbusa as well

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