Hello,
I have to move website to a different server. Not a problem, I already set up
all services on the new location and it works. I'm using named on new server
and I'm using it as my resolving nameserver so I can test if everything works.
However, authoritative NSs still point to old server. Since this website's
files are not static (some content is uploaded by users) and database is also
changed, I can't just have both of them running until DNSs around the world
pick up new IP.
I'm planning to reduce TTL to some small value before changing authoritative
NSs, but lot of nameservers don't respect TTL, so that's not really a
solution for having small or no downtime.
To the point, I'm thinking of using iptables to forward all traffic that come
to old server's ports 80 and 443 to new server. Is that possible? What
iptables rules would do this? I never used iptables for forwarding, so I would
appreciate if anyone can confirm this is doable and how.
Regards,
Veljko