« Configuration serveur wireguard OVH1 » : différence entre les versions

De wiki_pcwiki2
Aller à la navigationAller à la recherche
Page créée avec « '''Configuration du serveur OVH1:''' # OVH1::/etc/wireguard/wg1.conf # Le 27/06/2024: [Interface] Address = 10.0.1.1/32 ListenPort = 51821 # Private Key du serveur OVH... »
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :


  '''Configuration du serveur OVH1:'''
  '''Configuration du serveur OVH1:'''
# OVH1::/etc/wireguard/wg1.conf
# OVH1::/etc/wireguard/wg1.conf
# Le 27/06/2024:
# Le 27/06/2024:
 
[Interface]
Address = 10.0.1.1/32
ListenPort = 51821
 
# Private Key du serveur OVH1:
PrivateKey = aGMBMMT0HlH3Q/FOJ6yDh6OHu/75wjg2cTEUq2/MWnc=
 
PostUp  = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE


[Peer]
[Interface]
# Clé du client SRV05  (192.168.1.5)  
Address = 10.0.1.1/32
Publickey = DUnIaFntjOqb3EH9zVq0LFBRccoH/txJ08W3rv8B73M=
ListenPort = 51821
PersistentKeepalive = 20
AllowedIPs = 10.0.1.5/32
# Private Key du serveur OVH1:
[Peer]
PrivateKey = aGMBMMT0HlH3Q/FOJ6yDh6OHu/75wjg2cTEUq2/MWnc=
# Clé du client SRV06  (192.168.1.6)  
Publickey = 8j0LhP+YWqlyH9Yj30lIakibvlEeIPRfsCzWmKJhfBQ=
PostUp  = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE
PersistentKeepalive = 20
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE
AllowedIPs = 10.0.1.6/32
[Peer]
# Clé du client SRV05  (192.168.1.5)  
Publickey = DUnIaFntjOqb3EH9zVq0LFBRccoH/txJ08W3rv8B73M=
PersistentKeepalive = 20
AllowedIPs = 10.0.1.5/32
[Peer]
# Clé du client SRV06  (192.168.1.6)  
Publickey = 8j0LhP+YWqlyH9Yj30lIakibvlEeIPRfsCzWmKJhfBQ=
PersistentKeepalive = 20
AllowedIPs = 10.0.1.6/32
[Peer]
[Peer]
# Clé du client XPS13  (192.168.1.13)
# Clé du client XPS13  (192.168.1.13)
Ligne 29 : Ligne 29 :
PersistentKeepalive = 20
PersistentKeepalive = 20
AllowedIPs = 10.0.1.13/32
AllowedIPs = 10.0.1.13/32
[Peer]
[Peer]
# Clé du client SRV17  (192.168.1.17)  
# Clé du client SRV17  (192.168.1.17)  
Publickey = 7wBupLOQktTuwVecurg9+ZgcgwqIzHbRAfgZVnDMfws=
Publickey = 7wBupLOQktTuwVecurg9+ZgcgwqIzHbRAfgZVnDMfws=
PersistentKeepalive = 20
PersistentKeepalive = 20
AllowedIPs = 10.0.1.17/32
AllowedIPs = 10.0.1.17/32
[Peer]
[Peer]
# Clé du client SRV18  (192.168.1.18)
# Clé du client SRV18  (192.168.1.18)
Publickey = BPBurdxfynCJtK6yh4fVlD6zF+rH03ZE7QQuqulQlSs=
Publickey = BPBurdxfynCJtK6yh4fVlD6zF+rH03ZE7QQuqulQlSs=
PersistentKeepalive = 20
PersistentKeepalive = 20
AllowedIPs = 10.0.1.18/32
AllowedIPs = 10.0.1.18/32
[Peer]
[Peer]
# Clé du client SRV09  (192.168.1.25)
# Clé du client SRV09  (192.168.1.25)
Publickey = acVxZhdBXe87kPX4ARmhrKZ4RcZlZFgUcZZo2iEgei8=
Publickey = acVxZhdBXe87kPX4ARmhrKZ4RcZlZFgUcZZo2iEgei8=
PersistentKeepalive = 20
PersistentKeepalive = 20
AllowedIPs = 10.0.1.25/32
AllowedIPs = 10.0.1.25/32

Version du 27 juin 2024 à 14:52

Configuration du serveur OVH1:
# OVH1::/etc/wireguard/wg1.conf
# Le 27/06/2024:
[Interface]
Address = 10.0.1.1/32
ListenPort = 51821

# Private Key du serveur OVH1:
PrivateKey = aGMBMMT0HlH3Q/FOJ6yDh6OHu/75wjg2cTEUq2/MWnc=

PostUp   = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE

[Peer]

# Clé du client SRV05 (192.168.1.5) Publickey = DUnIaFntjOqb3EH9zVq0LFBRccoH/txJ08W3rv8B73M= PersistentKeepalive = 20 AllowedIPs = 10.0.1.5/32

[Peer]

# Clé du client SRV06 (192.168.1.6) Publickey = 8j0LhP+YWqlyH9Yj30lIakibvlEeIPRfsCzWmKJhfBQ= PersistentKeepalive = 20 AllowedIPs = 10.0.1.6/32 [Peer] # Clé du client XPS13 (192.168.1.13) Publickey = IxCXwhfZ5Lf0yYUSZR5g+5aeRkFAmNIKLtHVd9MX0Cc= PersistentKeepalive = 20 AllowedIPs = 10.0.1.13/32

[Peer]

# Clé du client SRV17 (192.168.1.17) Publickey = 7wBupLOQktTuwVecurg9+ZgcgwqIzHbRAfgZVnDMfws= PersistentKeepalive = 20 AllowedIPs = 10.0.1.17/32

[Peer]

# Clé du client SRV18 (192.168.1.18) Publickey = BPBurdxfynCJtK6yh4fVlD6zF+rH03ZE7QQuqulQlSs= PersistentKeepalive = 20 AllowedIPs = 10.0.1.18/32

[Peer]

# Clé du client SRV09 (192.168.1.25) Publickey = acVxZhdBXe87kPX4ARmhrKZ4RcZlZFgUcZZo2iEgei8= PersistentKeepalive = 20 AllowedIPs = 10.0.1.25/32