URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 23038
[ Назад ]

Исходное сообщение
"resolver"

Отправлено Andrew Evdokimov , 15-Ноя-02 16:57 
Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю очередь она лезла в /etc/hosts, больше никуда.

Содержание

Сообщения в этом обсуждении
"RE: resolver"
Отправлено Medlar , 15-Ноя-02 17:03 
>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>очередь она лезла в /etc/hosts, больше никуда.

см. nsswitch.conf


"RE: resolver"
Отправлено Andrew Evdokimov , 15-Ноя-02 17:05 
>>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>>очередь она лезла в /etc/hosts, больше никуда.
>
>см. nsswitch.conf


Проблема в том, что его нет :) А формат я наизусть не помню.


"RE: resolver"
Отправлено Medlar , 15-Ноя-02 17:14 
На моем RedHat'е вот такой конфиг:
Права 644 root root
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       nisplus or nis+         Use NIS+ (NIS version 3)
#       nis or yp               Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files                   Use the local files
#       [NOTFOUND=return]       Stop searching if not found so far
#

passwd:     files nisplus nis
shadow:     files nisplus nis
group:      files nisplus nis

hosts:      files nisplus nis dns

services:   nisplus [NOTFOUND=return] files
networks:   nisplus [NOTFOUND=return] files
protocols:  nisplus [NOTFOUND=return] files
rpc:        nisplus [NOTFOUND=return] files
ethers:     nisplus [NOTFOUND=return] files
netmasks:   nisplus [NOTFOUND=return] files    
bootparams: nisplus [NOTFOUND=return] files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus


"RE: resolver"
Отправлено Andrew Evdokimov , 15-Ноя-02 17:18 
>На моем RedHat'е вот такой конфиг:

Я писал про бздю, вообще-то...


"RE: resolver"
Отправлено Medlar , 15-Ноя-02 17:23 
Не знаю как во FreeBSD, а в LINUX Network Administration Guide
сказано, что старая стандартная библиотека Linux, libc использовала файл /etc/hosts.conf, но новая библ-ка glibc  - /etc/nsswitch.conf


"RE: resolver"
Отправлено dato , 15-Ноя-02 17:14 
>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>очередь она лезла в /etc/hosts, больше никуда.


v hosts.conf propishi

order hosts, bind


"RE: resolver"
Отправлено Andrew Evdokimov , 15-Ноя-02 17:19 
>>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>>очередь она лезла в /etc/hosts, больше никуда.
>
>
>v hosts.conf propishi
>
>order hosts, bind

/etc/hosts.conf тоже нету на машине. Создать?



"RE: resolver"
Отправлено lavr , 15-Ноя-02 17:59 
>>>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>>>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>>>очередь она лезла в /etc/hosts, больше никуда.
>>
>>
>>v hosts.conf propishi
>>
>>order hosts, bind
>
>/etc/hosts.conf тоже нету на машине. Создать?

host.conf != hosts.conf

------------------------- /etc/host.conf ------------------------------
# $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
# First try the /etc/hosts file
hosts
# Now try the nameserver next.
#--lavr, don't use DNS :(((
#bind
# If you have YP/NIS configured, uncomment the next line
# nis
-----------------------------------------------------------------------

и получаем массу неприятностей, но если нравится, то не вопрос