Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Interface]
- Address = 10.18.6.1/24
- MTU = 1380
- ListenPort = 51820
- PostUp = wg set %i private-key /etc/wireguard/%i.key
- #basic routing
- PostUp = iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE
- PostDown = iptables -t nat -D POSTROUTING -o ens5 -j MASQUERADE
- #Forward port 80 and 443 from internet to ubuntu server
- PostUp = iptables -t nat -A PREROUTING -i ens5 -p tcp --dport 80 -j DNAT --to-destination 10.18.6.5:80
- PostUp = iptables -t nat -A PREROUTING -i ens5 -p tcp --dport 443 -j DNAT --to-destination 10.18.6.5:443
- PostDown = iptables -t nat -D PREROUTING -i ens5 -p tcp --dport 80 -j DNAT --to-destination 10.18.6.5:80
- PostDown = iptables -t nat -D PREROUTING -i ens5 -p tcp --dport 443 -j DNAT --to-destination 10.18.6.5:443
- [Peer]
- PublicKey = <ubuntu public key>
- AllowedIPs = 10.18.6.5/32
- PresharedKey = <ubuntu preshared key>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement