VPN avec IP failOver
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

VPN avec IP failOver

by
MatinGarix
Created on 2016-11-10 13:48:47 (edited on 2024-09-04 12:40:53) in Serveurs Privés Virtuels (VPS)

Bonjour à tous,

J'ai installé un serveur VPN (en suivant ce tuto de Digital Ocean sur un VPS ovh et j'ai ajouté une Ip Failover en suivant la doc d'OVH.

Maintenant j'aimerai faire en sorte que mon VPN sorte sur l'IP du FailOver et non celui du serveur.
J'ai donc essayé la manip :
- Article de blog Iptables : Utiliser un VPN avec une IP failover de kdecherf

Mais voilà, ça ne fonctionne pas. Quand je test mon ip sur mon-ip.com j'ai toujours l'ip du serveur qui est affiché et pas celui du failover.

Est-ce par ce que dans le tuto de Digital Ocean à l'étape 8 "Adjust the Server Networking Configuration" il y a une modification des règles UFW ?

J'ai essayé en desactivant la règle ou d'ajouter ma nouvelle règle en complément (ce qui suis) mais ça ne fonctionne pas.

```
$ nano /etc/ufw/before.rules

# START OPENVPN RULES
# NAT table rules
*nat
:POSTROUTING ACCEPT [0:0]
# Allow traffic from OpenVPN client to wlp11s0 (change to the interface you discovered!)
-A POSTROUTING -s 10.8.0.0/8 -o ens3 -j MASQUERADE
-A POSTROUTING -s 10.8.0.0/8 ! -d 10.8.0.0/8 -j SNAT --to-source MON_IP_FAILOVER
COMMIT
# END OPENVPN RULES
```
Pouvez-vous m'aider ?

Merci