x-lite dns lookup from local hosts file

1

I've added a domain to my local /etc/hosts file on osx 10.9.2. if I ping the domain, it resolves to the configured ip in the /etc/hosts. If I put the domain into the "Domain" field for a SIP Account configuration in x-lite, it gets the ip from the public dns server ignoring the /etc/host file. Is there a way to force x-lite to use the local hosts file for dns lookup?

markus

Posted 2014-05-08T16:57:29.337

Reputation: 145

Answers

1

It seems that one of the reasons that x-lite can still reach the domain is because you don't have a separate line with an IPv6 loopback (an IPv6 version of the 127.0.0.1 address the blocked domain currently redirects to). x-lite must be ignoring the IPv4 entry, and connecting to the blocked domain via an IPv6 address.

You can fix this by adding one line to your /etc/hosts file. A similar question HERE suggests that you use fe80::1%lo0 as the IPv6 loopback address, as it says that OS X versions later than 10.8.2 won't respect the ::1 loopback address.

An example of the line you need to add to your host file is:

fe80::1%lo0 DOMAINTOBEBLOCKED.com

If this doesn't work, I would suggest having a look at some of the other answers on the question above. One that looks promising is:

Try adding following line in /etc/resolv.conf

lookup file, bind

This should force OS X to use /etc/hosts before dns. The only problem is if you use dhcp, this file will be overwrote each reboot.

joeeey

Posted 2014-05-08T16:57:29.337

Reputation: 1 396

@markus Did you try the instructions above? Did they work? – joeeey – 2014-05-20T08:24:11.050