0

My webhoster seems to have some troubles with DDOS attacks and routing overload. This makes my IP to be not available sometimes and I'd like to add a failover IP for the domain.

However, 2 A-Records means that it's similar to a load balancer which is NOT what i am looking for. I do not want the fallback machine to be accessed any time - except in case of real troubles or downtime of first choice IP.

Is there a out-of-the box solution that allows me such a failover ip?

If not, if it requires a DNS re-configuration: Is there a recommended script or similar that can be run on the secondary machine (of course, this is with a different hoster). This has to check whether the first choice ip is down and must overwrite the A-record, right? This requires my domain hoster to provide an API for the DNS settings...

Mike Pennington
  • 8,266
  • 9
  • 41
  • 86
ledy
  • 515
  • 1
  • 6
  • 15

1 Answers1

1

Any DNS provider that supports Dynamic DNS can assist with this requirement.

Let's assume you use DynDns and get a dynamic DNS name of uptime.homeunix.comNote 1. Assume your DynDns username is foobarme, and your password is "LeTmeiN"

  • Assume the address of your primary webhost is 192.0.2.100
  • Assume the address of your backup webhost is 192.0.2.200
  • Assume your web service's address is http://solid.rock.local/

Use ipcheck.py to assign your primary address to uptime.homeunix.com (I'm using linux)...

$ python ipcheck.py -a 192.0.2.100 foobarme LeTmeiN uptime.homeunix.com

Now CNAME solid.rock.local to uptime.homeunix.com.

If you need to use the backup webhost, it's this easy...

$ python ipcheck.py -a 192.0.2.200 foobarme LeTmeiN uptime.homeunix.com

The DNS TTL on these DynDns DDNS records is typically one-minute... pretty low.


Note 1: BTW, uptime.homeunix.com is available right now if you like it :-)

Mike Pennington
  • 8,266
  • 9
  • 41
  • 86
  • thanks, can this script also do the reliable check for current ip being down for me? so it's only overwriting the DNS in case of issues with the prefered server. – ledy Aug 02 '12 at 10:11
  • This script will only assign ip addresses to the DDNS entry... the criteria for changing between your primary and backup webhost is outside it's capabilities – Mike Pennington Aug 02 '12 at 14:50