Advertisement
finders2014

aws_config

Dec 31st, 2024 (edited)
2,368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Interface]
  2. Address = 10.18.6.1/24
  3. MTU = 1380
  4. ListenPort = 51820
  5. PostUp = wg set %i private-key /etc/wireguard/%i.key
  6.  
  7. #basic routing
  8. PostUp = iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE
  9. PostDown = iptables -t nat -D POSTROUTING -o ens5 -j MASQUERADE
  10.  
  11.  
  12. #Forward port 80 and 443 from internet to ubuntu server
  13. PostUp = iptables -t nat -A PREROUTING -i ens5 -p tcp --dport 80 -j DNAT --to-destination 10.18.6.5:80
  14. PostUp = iptables -t nat -A PREROUTING -i ens5 -p tcp --dport 443 -j DNAT --to-destination 10.18.6.5:443
  15.  
  16. PostDown = iptables -t nat -D PREROUTING -i ens5 -p tcp --dport 80 -j DNAT --to-destination 10.18.6.5:80
  17. PostDown = iptables -t nat -D PREROUTING -i ens5 -p tcp --dport 443 -j DNAT --to-destination 10.18.6.5:443
  18.  
  19.  
  20. [Peer]
  21. PublicKey = <ubuntu public key>
  22. AllowedIPs = 10.18.6.5/32
  23. PresharedKey = <ubuntu preshared key>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement