Posts tagged with: #wireguard

Client-to-client communication in wireguard

2025-11-13

It's entirely possible for 2 wireguard clients to communicate with each other in a wireguard VPN setup.

All you've got to do is include a line like:

PersistentKeepalive = 15

...in the [Peer] section of the clients' wireguard configuration file, so that the wireguard server knows the clients are alive and can forward packets to them.

Besides of course enabling forwarding in your kernel and adding:

PostUp = iptables -A FORWARD -i wg0 -o wg0 -j ACCEPT
PostDown = iptables -D FORWARD -i wg0 -o wg0 -j ACCEPT

...to your wireguard server's [Interface] section.