VPS avec Additional IP
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

VPS avec Additional IP

by
HuziW
Created on 2024-06-03 05:31:12 (edited on 2024-09-04 13:46:28) in Serveurs Privés Virtuels (VPS)

Bonjour à tous,

J'ai un VPS Ubuntu 24.04 avec un additional IP. Une fois que netplan est configuré, j'ai bien mon interface "ens3" avec 2 IP : l'IP d'origine, ainsi que l'additional IP. Lorsque je récupère mon IP avec la commande "dig", l'IP qui ressort est toujours mon IP d'origine. Je n'arrive pas à sortir avec l'autre adresse IP.
Comment puis-je sortir avec l'autre IP svp ?

Merci à tous.


2 Replies ( Latest reply on 2024-06-04 09:39:58 by
fritz2cat officiel (d'avant la migration)
)


Lorsque je récupère mon IP avec la commande "dig"


Bonjour, ce n'est pas la bonne commande.

Faites la commande: "ip a"

Oui, "ip a" me permet de voir mes interfaces réseaux et les IP associées.
Mon interface ens3 a 2 IPs publiques, je souhaite pouvoir switcher facilement d'IP publique. Pour cela, dig me permet de savoir avec quelle IP je sors.
Pour l'instant, je ne parviens pas à sortir sur internet avec ma 2e adresse IP.


je ne parviens pas à sortir sur internet avec ma 2e adresse IP.


C'est chaque applicatif qui peut choisir son adresse IP de sortie.
Cherchez "bind" dans les paramètres de votre applicatif.

Voyez par exemple: https://unix.stackexchange.com/questions/236865/what-does-bind-address-mean-in-ssh-port-forwarding

Voyez par exemple inet_interfaces pour Postfix.

Voyez par exemple 'wget --bind-address=ADDRESS'

When making client TCP/IP connections, bind to ADDRESS on the local machine. ADDRESS may be
specified as a hostname or IP address. This option can be useful if your machine is bound to
multiple IPs.