Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю очередь она лезла в /etc/hosts, больше никуда.
>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>очередь она лезла в /etc/hosts, больше никуда.см. nsswitch.conf
>>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>>очередь она лезла в /etc/hosts, больше никуда.
>
>см. nsswitch.conf
Проблема в том, что его нет :) А формат я наизусть не помню.
На моем 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 nishosts: 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] filesnetgroup: nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus
>На моем RedHat'е вот такой конфиг:Я писал про бздю, вообще-то...
Не знаю как во FreeBSD, а в LINUX Network Administration Guide
сказано, что старая стандартная библиотека Linux, libc использовала файл /etc/hosts.conf, но новая библ-ка glibc - /etc/nsswitch.conf
>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>очередь она лезла в /etc/hosts, больше никуда.
v hosts.conf propishiorder hosts, bind
>>Как бы так настроить FreeBSD 4.5, чтобы она не лезла на dns
>>в попытках разрешить имя хоста? Хочу, чтобы в первую и последнюю
>>очередь она лезла в /etc/hosts, больше никуда.
>
>
>v hosts.conf propishi
>
>order hosts, bind/etc/hosts.conf тоже нету на машине. Создать?
>>>Как бы так настроить 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
-----------------------------------------------------------------------и получаем массу неприятностей, но если нравится, то не вопрос