Configuration serveur wireguard OVH1

De wiki_pcwiki2
Aller à la navigationAller à la recherche
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