Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Server side
- $ sysctl -w net.ipv4.conf.eth0.proxy_arp=1 && sysctl -w net.ipv4.ip_forward=1 && ip addr del SECOND_IP/NETMASK dev eth0
- $ cat /etc/wireguard/server.conf
- [Interface]
- Address = 10.0.0.1/32
- PrivateKey = SERVER_PRIVATEKEY
- ListenPort = 51820
- [Peer]
- PublicKey = PEER0_PUBLICKEY
- PresharedKey = PEER0_PSK
- AllowedIPs = SECOND_IP/32
- # "Client" side
- $ cat /etc/wireguard/peer0.conf
- [Interface]
- Address = SECOND_IP/32
- PrivateKey = PEER0_PRIVATEKEY
- DNS = 1.1.1.1
- [Peer]
- PublicKey = SERVER_PUBLICKEY
- PresharedKey = PEER0_PSK
- AllowedIPs = 0.0.0.0/0
- Endpoint = MAIN_IP:51820
- PersistentKeepalive = 25
Add Comment
Please, Sign In to add comment