- 軽量VPNソリューション。OpenVPNよりいいらしいので試してみるか
install & setting†
dnf install -y wireguard-tools
# store secretkey
cd /etc/wireguard/
# set permission for root only
umask 077
create private key and public key†
wg genkey | tee client.key | wg pubkey > client.pub
setting file†
[Interface]
Address = ServerのVPN IP/24
ListenPort = 任意のポート
PrivateKey = Serverの秘密鍵
# 起動時にFW設定
PostUp = firewall-cmd --add-port=任意のポート/udp
PostDown = firewall-cmd --remove-port=任意のポート/udp
[Peer]
PublicKey = Clientの公開鍵
AllowedIPs = ClientのVPN IP/32
client setting†