Wednesday, 21 August 2013

Two A records - One Local IP and One Online IP [duplicate]

Two A records - One Local IP and One Online IP [duplicate]

This question already has an answer here:
Returning different DNS records depending on who asks 3 answers
I have a bit of a strange requirement and I want to know if its possible.
I want to create the following domain name, server.example.com.
When im in the office, I would like to use server.example.com and have it
use my LAN connection so its nice and fast.
When im out of the office, I would like it to still use server.example.com
and have it see that im not on the local network, and use the online IP.
At the moment I have it setup like this:
My DNS zone for example.com (two A records):
server A 192.168.1.253 (local IP)
server A 1.1.1.1 (online IP)
Thats as far as I have gotten, but when I traceroute from outside of the
office lan I get this:
traceroute: Warning: server.example.com has multiple addresses; using
192.168.1.253
traceroute to server.example.com (192.168.1.253), 64 hops max, 52 byte
packets
At this point, I was hoping it would have used the online IP.
Any idea how I can achieve this?

No comments:

Post a Comment