поиск в x-lite dns из локального файла hosts

793
markus

Я добавил домен в свой локальный файл / etc / hosts на osx 10.9.2. если я пингую домен, он разрешает настроенный ip в / etc / hosts. Если я помещаю домен в поле «Домен» для настройки учетной записи SIP в x-lite, он получает ip с общедоступного сервера dns, игнорируя файл / etc / host. Есть ли способ заставить X-Lite использовать локальный файл hosts для поиска DNS?

1

1 ответ на вопрос

1
joeeey

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.

@markus Вы пробовали инструкции выше? Они работали? joeeey 10 лет назад 0

Похожие вопросы