I have a SMTP server in Hetzner Cloud. Have added floating IPv4 and IPv6 (in case I switch server and the IP's can follow to the new server)
How to set the floating IP's as primary?
When a client sends a mail it is sent to the floating IP (smtp.server.com), but when the SMTP forwards the mail to recipient server the primary IP is used and SPF fails
How to set the floating IP's as the primary IP addresses?
I want to set
eth0:1 as the primary outbound IP address for both the IPv4 and IPv6
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp dns-nameservers xx.xx.xx.xx xx.xx.xx.xx xx.xx.xx.xx iface eth0 inet6 static address [primary IPv6] gateway fe80::1 # Additional IPv4 (floating IP) auto eth0:1 iface eth0:1 inet static address [additional IPv4] netmask 32 # Additional IPv6 (floating IP) auto eth0:1 iface eth0:1 inet6 static address [additional IPv6] netmask 64