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?


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 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:


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.

  • @markus Did you try the instructions above? Did they work? – joeeey May 20 '14 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.