|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
Debian: non voglio che i DNS vengano assegnati automaticamente dal DHCP server
Salve a tutti,
ho una Debian configurata in modo che ottenga un indirizzo IP dal router, tramite dhclient, ma non voglio che prenda anche i DNS, andando a modificare il file /etc/resolv.conf. Ho provato a smanettare con le opzioni in /etc/dhcp/dhclient.conf ma i nameservers vengono sempre riscritti nel file /etc/resolv.conf. Si può disabilitare? |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
con cosa gestisci le impostazioni di rete ? Ad esempio se usi NetworkManager devi usare i suoi tool di impostazione.
Se hai resolvconf la soluzione "corretta" non la so, ma volendo basta mettere il dns che vuoi in /etc/resolvconf/resolv.conf.d/head e ti verra' messo sempre prima degli altri.
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
rettifico
da http://wiki.debian.org/NetworkConfig...lvconf_program dns-nameservers 12.34.56.78 12.34.56.79 in /etc/network/interfaces
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
Ti spiego, la Debian in questione è un server DNS, senza windows manager e network manager, in un domU Xen e ottiene un indirizzo IP dinamicamente (che in realtà è sempre lo stesso). Il punto è che ogni volta mi viene sovrascritto il file /etc/resolv.conf e come dicevo, non voglio che accada.
Tempo fa riuscii a disabilitare questo comportamento su Gentoo Linux, modificando il file /etc/conf.d/net, analogo di /etc/network/interfaces. Avevo già letto quella pagina che mi hai segnalato ma non sono riuscito a risolvere, o perché non ho capito bene o perché non è quello che cerco io. Grazie! |
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
Non hai proprio niente che gestisca resolv.conf ?
Se non mi ricordo male su debian viene usato di default resolvconf, per questo ti indicavo quel link. Riporti cosa ti viene scritto in cima a /etc/resolv.conf ? Ci dovrebbe essere la dritta per capire qualce programma lo modifica (se dhclient direttamente o qualcun altro).
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
Compaiono solo i due nameservers.
Sono abbastanza convinto che sia dhclient. Fra l'altro nel file /etc/dhcp/dhclient.conf c'è la seguente "roba": Codice:
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
Inoltre nelle righe successive ho provato a togliere domain-name-servers e domain-search, ma non ha sortito alcun effetto. Eppure sembra abbastanza intuitiva la cosa, ma non funziona. Ho anche provato a commentare tutta la direttiva request, sempre indicata qui sopra, ma anche in questo caso, niente. Secondo me è proprio nel file /etc/dhcp/dhclient.conf che va modificato qualcosa, ma non saprei cosa e come, in questo momento. Ultima modifica di fbcyborg : 30-09-2011 alle 13:43. |
|
|
|
|
|
#7 | |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
Quote:
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
|
#8 | |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
Quote:
Codice:
supersede domain-name-servers 12.34.56.78, 12.34.56.79
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
|
#9 | ||
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
Quote:
Quote:
Codice:
search test.lan |
||
|
|
|
|
|
#10 |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
immagino possa essere
supersede domain-search test.lan ?
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
|
#11 |
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
mmmh. no! non funziona!
Grazie! |
|
|
|
|
|
#12 |
|
Senior Member
Iscritto dal: Jan 2004
Città: ROMA
Messaggi: 2055
|
Aggiornamento:
Funziona se metto i doppi apici, ovvero: Codice:
supersede domain-search "test.lan"; # cat /etc/resolv.conf search test.lan. nameserver 127.0.0.1 |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 17:44.





















