wireguard基本安装和配置(by GPT3 达芬奇)
- 安装wireguard:
sudo apt-get install wireguard
- 创建配置文件:
sudo nano /etc/wireguard/wg0.conf
- 编辑配置文件:
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <Your Private Key>
[Peer]
PublicKey = <Peer's Public Key>
AllowedIPs = 10.0.0.2/32
Endpoint = <Peer's IP Address>:51820
- 启动wireguard:
sudo wg-quick up wg0
- 检查wireguard状态:
sudo wg show