0

With the help of an extensive number of guides, I managed to create a working VPN server and even added one client, however, when adding a second client, a problem arose, the configurations seemed to be done correctly, but while one client has access to the Internet, the second only receives a handshake from the server and no internet traffic. What could be the reason?

Server config

[Interface]
Address = 1.1.1.1/24
SaveConfig = false
PreUp = iptables -t nat -A POSTROUTING -j MASQUERADE -o ens3
PreDown = iptables -t nat -D POSTROUTING -j MASQUERADE -o ens3
ListenPort = 49312
PrivateKey = ...

[Peer]
AllowedIPs = address.2/32
PublicKey = ...
PresharedKey = ...

[Peer]
AllowedIPs = address.3/32
PublicKey = ...
PresharedKey = ...

Peer1 config (Works fine)

[Interface]
Address = address.2/32
PrivateKey = ...

[Peer]
Endpoint = my-ip:49312
AllowedIPs = 0.0.0.0/0
PublicKey = ...
PresharedKey = ...

Peer2 config (No internet connection)

[Interface]
Address = address.3/32
PrivateKey = ...

[Peer]
Endpoint = my-ip:49312
AllowedIPs = 0.0.0.0/0
PublicKey = ...
PresharedKey = ...

Is there some mistake on my behalf or is there some other thing that i should know about?

6
  • 1
    Giving your private network the internet routeable address 1.1.1.0/24 is bound to create issues.
    – zwets
    Commented Jan 17 at 21:11
  • It's just an example. The real routable address is different
    – Leteers
    Commented Jan 18 at 9:03
  • OK, so it is in one of the non-internet-routable ranges (then why not put the actual IP in your question?), and this not a subnet that is already routable from client 2?
    – zwets
    Commented Jan 18 at 9:14
  • BTW mentioning WireGuard in your question (I had to infer this from the configs you posted) would help it get a bigger audience.
    – zwets
    Commented Jan 18 at 9:16
  • You say client 2 "only gets a handshake and no internet traffic", but does it actually connect to the server? Does wg show list it as a peer?
    – zwets
    Commented Jan 18 at 9:22

0

You must log in to answer this question.

Browse other questions tagged .