OVH Community, votre nouvel espace communautaire.

Ip FailOver configuration / Curl error SO_BINDTODEVICE


yoannr
16/12/2015, 15h55
Bonjour,

Je souhaite envoyé des requêtes http avec l'ip failover. J'ai ajouté l'ip failover en suivant le guide donné dans l'email.

http://guides.ovh.com/AjouterAliasIp/

Cependant quand j’exécute une requête curl en précisant l'interface c'est l'ip du serveur qui est utilisé.

Voici ma configuration pour l'interfaces, j'utilise un VPS CLOUD 1 avec debian 8 .

L'Ip du serveur est indiqué par MON.IP.VPS.SERVEUR, elle commence par 51.255.42.XXX.

Code:
auto eth0
iface eth0 inet dhcp
        address MON.IP.VPS.SERVEUR
        netmask 255.255.255.0
        broadcast 51.255.42.255
        network 51.255.42.0
        gateway 51.255.42.254
        post-up /sbin/ifconfig eth0:0 MON.IP.FAIL.OVER netmask 255.255.255.255 broadcast MON.IP.FAIL.OVER
        post-down /sbin/ifconfig eth0:0 down


Voici la requete curl
Code:
curl --verbose --interface  eth0:0 api.ipify.org?format=json
* Rebuilt URL to: ?format=json
* Hostname was NOT found in DNS cache
*   Trying 23.23.163.51...
* Local Interface eth0:0 is ip MON.IP.FAIL.OVER using address family 2
* SO_BINDTODEVICE eth0:0 failed with errno 19: No such device; will do regular bind
* Local port: 0
* Connected to api.ipify.org (23.23.163.51) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
*        subject: OU=Domain Control Validated; OU=EssentialSSL; CN=api.ipify.org
*        start date: 2015-10-22 00:00:00 GMT
*        expire date: 2016-11-20 23:59:59 GMT
*        subjectAltName: api.ipify.org matched
*        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA
*        SSL certificate verify ok.
> GET /?format=json HTTP/1.1
> User-Agent: curl/7.38.0
> Host: api.ipify.org
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Cowboy is not blacklisted
< Server: Cowboy
< Connection: keep-alive
< Content-Type: application/json
< Date: Mon, 14 Dec 2015 13:43:40 GMT
< Content-Length: 22
< Via: 1.1 vegur
<
* Connection #0 to host api.ipify.org left intact
{"ip":"MON.IP.VPS.SERVEUR"}
Merci pour votre aide.

Cordialement Yoann