2
1
I am a developer on a project that uses amazon servers for testing. I am switching from using FoxyProxy
to routing with iptables
because it is more convenient.
The trouble I ran into is that when running DNS resolution I find that more than one address is returned with multiple calls to resolve a given domain.
For instance:
$ host sample.domain.com
sample.domain.com has address 50.200.80.100
$ host sample.domain.com
sample.domain.com has address 50.200.80.101
This is a stark contrast to google which:
$ host www.google.com
www.google.com has address 74.125.225.81
www.google.com has address 74.125.225.80
www.google.com has address 74.125.225.84
www.google.com has address 74.125.225.82
www.google.com has address 74.125.225.83
www.google.com has IPv6 address 2607:f8b0:4009:803::1012
Currently I am resolving the host many times to build a list of IPs and use that to set the iptable routes. Is there a better way to do this?
Note: I don't have access to change anything about the server so any suggested solution will have to be client side.
Can you give a real domain name that causes the issue? – Werner Henze – 2014-12-04T15:38:44.977
Unfortunately, I am not permitted to provide that information. – Tiris – 2014-12-05T14:54:22.917
My test here with www.zdf.de showed that nslookup and host both return two IP addresses in one call. If I call the lookups again, I get the same result. So if you don't want to provide any DNS name (no need to provide the critical ones) that shows the result you describe I cannot reproduce that here and help you. – Werner Henze – 2014-12-05T14:59:29.677