Wireguard conf files

Post Reply
zemerdon
Site Admin
Posts: 239
Joined: Mon Jan 23, 2023 8:13 pm

Wireguard conf files

Post by zemerdon »

server /etc/wireguard/wg0.conf

Code: Select all

# local settings for Host α
[Interface]
# host a .key
PrivateKey = key
Address = 192.168.1.11/32
ListenPort = 51821

# IP forwarding
PreUp = sysctl -w net.ipv4.ip_forward=1

# remote settings for Host β
[Peer]
# host b .pub
PublicKey = key
Endpoint = 58.96.52.26:51822
AllowedIPs = 192.168.2.5/32
client /etc/wireguard/wg0.conf

Code: Select all

# local settings for Host β
[Interface]
# host b .key
PrivateKey = key
Address = 192.168.2.5/32
ListenPort = 51822

# IP forwarding
PreUp = sysctl -w net.ipv4.ip_forward=1

# remote settings for Host α
[Peer]
# host a .pub
PublicKey = key
Endpoint = 27.96.221.115:51821
AllowedIPs = 192.168.1.0/24
Post Reply