Skip to main content

Mac安装Wireguard

· One min read
Alan
  1. 安装 WireGuard 客户端
brew install wireguard-tools
  1. 配置 WireGuard 客户端
sudo mkdir /usr/local/etc/wiregurad 
sudo touch /usr/local/etc/wiregurad/wg0.conf

wg0.conf 文件如下:

[Interface]
Address = 10.200.200.2/32
PrivateKey = <client_private_key>
MTU = 1420

[Peer]
PublicKey = <server_public_key>
Endpoint = <SERVER_IP:SERVER_PORT>
AllowedIPs = 10.200.0.0/16
PersistentKeepalive = 25
  1. 启动 WireGuard
sudo wg-quick up wg0-client
sudo wg show
note

117503445提醒, 启动WireGuard的命令应该是 sudo wg-quick up wg0

原文