Advertisement
Dialgatrainer069

ansible made configs vs example ones

Aug 18th, 2024 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ansible made wireguard configs
  2. oracle cloud vps
  3.  sudo cat /etc/wireguard/wg0.conf
  4. # Ansible managed
  5.  
  6. [Interface]
  7. # wireguard-oci
  8. Address = 10.50.0.1/32
  9. PrivateKey = ######################################
  10. ListenPort = 51820
  11. PostUp = nft add table inet wireguard; nft add chain inet wireguard wireguard_chain {type nat hook postrouting priority srcnat\; policy accept\;}; nft add rule inet wireguard wireguard_chain counter packets 0 bytes 0 masquerade;
  12. PostDown = nft delete table inet wireguard;
  13.  
  14. [Peer]
  15. # Name = wireguard-home
  16. PublicKey = ############################################
  17. AllowedIPs = 10.50.0.2/32
  18. Endpoint = 5.65.187.97:51821
  19.  
  20. [Peer]
  21. # Name = arrstack1
  22. PublicKey = ###########################################
  23. AllowedIPs = 10.50.0.3/32
  24. Endpoint = 5.65.187.97:51820
  25.  
  26. arrstack1 lxc on home network behind nat
  27.  sudo cat /etc/wireguard/wg0.conf
  28. # Ansible managed
  29.  
  30. [Interface]
  31. # arrstack1
  32. Address = 10.50.0.3/32
  33. PrivateKey = #############################################
  34. ListenPort = 51820
  35.  
  36. [Peer]
  37. # Name = wireguard-oci
  38. PublicKey = #################################################
  39. AllowedIPs = 10.50.0.1/32
  40. PersistentKeepalive = 30
  41. Endpoint = 141.147.70.25:51820
  42.  
  43. [Peer]
  44. # Name = wireguard-home
  45. PublicKey = ################################################
  46. AllowedIPs = 10.50.0.2/32
  47. Endpoint = 5.65.187.97:51821
  48.  
  49. wireguard-home on home network
  50. # Ansible managed
  51.  
  52. [Interface]
  53. # wireguard-home
  54. Address = 10.50.0.2/32
  55. PrivateKey = ##############################################
  56. ListenPort = 51821
  57.  
  58. [Peer]
  59. # Name = wireguard-oci
  60. PublicKey = ##############################################
  61. AllowedIPs = 10.50.0.1/32
  62. PersistentKeepalive = 30
  63. Endpoint = 141.147.70.25:51821
  64.  
  65. [Peer]
  66. # Name = arrstack1
  67. PublicKey = ###############################################
  68. AllowedIPs = 10.50.0.3/32
  69. Endpoint = 5.65.187.97:51821
  70.  
  71.  
  72.  
  73. homemade mostly working wireguard configs
  74.  
  75. wg0- oracle vps equivalent
  76. [Interface]
  77. PrivateKey = mJaaX6RUvb2p20vEOAUEcGtSd+c8ilgq6YSL5QEKzUs=
  78. Address = 10.50.0.1/32
  79. ListenPort = 51820
  80. PostUp = nft add table inet wireguard; nft add chain inet wireguard wireguard_chain {typ
  81. e nat hook postrouting priority srcnat\; policy accept\;}; nft add rule inet wireguard w
  82. ireguard_chain counter packets 0 bytes 0 masquerade;
  83. PostDown = nft delete table inet wireguard;
  84.  
  85. #wg1
  86. [Peer]
  87. PublicKey = B5XhmeMxZGps7gP0ld75IQjX8pGrEyw8cNVUx46yC1Q=
  88. Endpoint = 192.168.0.202:51821
  89. AllowedIPs = 10.50.0.2/32
  90.  
  91. #wg2
  92. [Peer]
  93. PublicKey = s7chyyTKzBn+ubG1ggeh3yiP0s2DCDFzf0eBShsadlA=
  94. Endpoint = 192.168.0.202:51820
  95. AllowedIPs = 10.50.0.3/32
  96.  
  97.  
  98.  
  99. wg1 aka arrstack in ansible
  100. [Interface]
  101. PrivateKey = mMTO5hzyGzjVwe5XCIeZXxAR8emKwCaVx32YNx0QD2Q=
  102. Address = 10.50.0.2/32
  103. ListenPort = 51821
  104.  
  105. # wg0 peer
  106. [Peer]
  107. PublicKey = /XN9/yZHW7kJXCTYqyO6Hj5yKyUdEsAOWDv3EORd7kU=
  108. Endpoint = 192.168.0.200:51820
  109. AllowedIPs = 10.50.0.1/32
  110.  
  111. #wg2
  112. [Peer]
  113. PublicKey = s7chyyTKzBn+ubG1ggeh3yiP0s2DCDFzf0eBShsadlA=
  114. Endpoint = 192.168.0.202:51820
  115. AllowedIPs = 10.50.0.3/32
  116.  
  117.  
  118.  
  119. wg2 aka wireguard-home
  120. [Interface]
  121. PrivateKey = YNctXt05w8V1ZKmeI+oEvgyJLe/UhjSOw67v30Kmkko=
  122. Address = 10.50.0.3/32
  123. ListenPort = 51820
  124.  
  125. #wg0
  126. [Peer]
  127. PublicKey = /XN9/yZHW7kJXCTYqyO6Hj5yKyUdEsAOWDv3EORd7kU=
  128. Endpoint = 192.168.0.200:51820
  129. AllowedIPs = 10.50.0.1/32
  130. PersistentKeepalive = 25
  131.  
  132. #wg1
  133. [Peer]
  134. PublicKey = B5XhmeMxZGps7gP0ld75IQjX8pGrEyw8cNVUx46yC1Q=
  135. Endpoint = 192.168.0.202:51821
  136. AllowedIPs = 10.50.0.2/32
  137. PersistentKeepalive = 25
  138.  
  139.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement