WireGuard快速启动
WireGuard快速启动
机器B:

机器A:
1 | wg genkey > private |
机器B:
1 | sudo ip link add wg0 type wireguard |
现在初步设置好各自的私钥和内网ip。但是现在两者还不能互通。
现在开始用对方公钥参数进行互通,握手
机器A:
1 | wg set wg0 peer 6rG/IxtF5ThipkLsNzMuUvcQgzcnV5mr5dgzvtfZRBU= allowed-ips 10.0.0.2/32 endpoint B的ip:port |
机器B:
1 | wg set wg0 peer H1hGANkNKk2nH3JLLPkkirYSwUknJMolaThMA8BTOWI= allowed-ips 10.0.0.1/32 endpoint A的ip:port |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment




