Den HTTP und HTTPS Traffic mit iptables an den neuen Server weiterleiten:
#!/bin/sh
# redirect traffic on specified ports to other IP
# own/old IP
ME="176.9.123.123"
# new/destination IP
NEW="144.76.123.123"
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -X
#port 80 forwarding (http)
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $NEW:80
iptables -t nat -A POSTROUTING -p tcp -d $NEW --dport 80 -j SNAT --to-source $ME
#port 443 forwarding (https)
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination $NEW:443
iptables -t nat -A POSTROUTING -p tcp -d $NEW --dport 443 -j SNAT --to-source $ME