Advertisement
zyyhatcufe

wg

Sep 30th, 2018
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. --------VPS----------
  2. cat ./ipv6
  3. #!/bin/sh
  4. modprobe ipv6
  5. ip tunnel add he-ipv6 mode sit remote **** local ****
  6. ip link set he-ipv6 up
  7. ip link set he-ipv6 mtu 1420
  8. ip addr add 2001:470:****:****::2/64 dev he-ipv6
  9. ip -6 route add default dev he-ipv6
  10.  
  11. cat /etc/wireguard/wg.conf
  12. [Interface]
  13. Address = 172.27.1.1/32, 2001:470:****::1/128
  14. ListenPort = *****
  15. PrivateKey = ********
  16.  
  17. [Peer]
  18. Publickey = ********
  19. AllowedIPs = 172.16.0.0/12, 2001:470:****::2/128, 2001:470:****:1100::/56
  20.  
  21. ----start wireguard daemon
  22.  
  23. systemctl start wg-quick@wg
  24.  
  25. ----------OpenWrt-------
  26. /etc/config/network
  27.  
  28. config interface 'lan'
  29. option ifname 'eth0.1'
  30. option proto 'static'
  31. option ipaddr '172.30.1.1'
  32. option netmask '255.255.255.0'
  33. option ip6addr '2001:470:****:1100::1/56'
  34.  
  35. config interface 'wg'
  36. option proto 'wireguard'
  37. option private_key '********'
  38. list addresses '172.27.1.2/32'
  39. list addresses '2001:470:****::2/128'
  40.  
  41. config wireguard_wg
  42. option public_key '********'
  43. option endpoint_port '****'
  44. option endpoint_host '****'
  45. list allowed_ips '0.0.0.0/0'
  46. list allowed_ips '::/0'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement