WireGuard VPN 隧道 за 10 минут под Red Hat Enterprise Linux 8



Red Hat Enterprise Linux 8 下的 WireGuard VPN 隧道,10 分鐘 https://www.wireguard.com/ yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch。 rpm https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm yum -y install kmod-wireguard wireguard-tools wg genkey | tee 私鑰 | wg pubkey (угловая скобка вывода в файл) wgpublickey vi /etc/wireguard/wg0.conf 伺服器
[Interface]
PrivateKey= 地址=10.10.10.1/24 SaveConfig=true ListenPort=51820 客戶端
[Interface]
PrivateKey= 地址=10.10.10.2/24 SaveConfig=true

[Peer]
PublicKey= Endpoint=192.168.1.180:51820 AllowedIPs=0.0.0.0/0 PersistentKeepalive=30 Server wg set wg0 peer (publickey client) allowed-ips 10.10.10.2/32