Wenn ein Webserver „in Rente“ geht, man die Inhalten schon auf dem neuen Server hat und nur auf das DNS Update wartet, dann kann man auch via iptables den ankommenden Traffic auf dem neuen Server umleiten.

Mittels iptabels geht es wie folgt:
(für die Dienste http(s), pop3(s), imap(s), ftp und smtp(s))

sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination new-host-ip:80
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination new-host-ip:443
iptables -t nat -A PREROUTING -p tcp --dport 587 -j DNAT --to-destination new-host-ip:587
iptables -t nat -A PREROUTING -p tcp --dport 110 -j DNAT --to-destination new-host-ip:110
iptables -t nat -A PREROUTING -p tcp --dport 143 -j DNAT --to-destination new-host-ip:143
iptables -t nat -A PREROUTING -p tcp --dport 465 -j DNAT --to-destination new-host-ip:465
iptables -t nat -A PREROUTING -p tcp --dport 995 -j DNAT --to-destination new-host-ip:995
iptables -t nat -A PREROUTING -p tcp --dport 993 -j DNAT --to-destination new-host-ip:993
iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to-destination new-host-ip:25
iptables -t nat -A PREROUTING -p tcp --dport 21 -j DNAT --to-destination new-host-ip:21
iptables -t nat -A POSTROUTING -j MASQUERADE