Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £129! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £179! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[XP1000] Change nameservers but keep DHCP

FireballXL5

Forum Supporter
Donated Member
Joined
Feb 14, 2013
Messages
23
Reaction score
0
Points
0
I want to define my own DNS servers but I want to keep using DHCP to get an IP address but the system won't keep the settings I enter manually for after restarting the network or rebooting my box it defaults back to using my routers IP address. Is there anyway I can manually set my DNS servers, perhaps by manually editing a filea and keep DHCP?
Thanks.
 
Edit /etc/resolv.cfg

sebus

Thanks for the tip but it doesn't work. If I set DHCP to Yes and manually add the nameservers (either through the user interface or by editing resolve.cfg) the system changes the nameservers back to my router address after a restart. I want to have the router maintain the dynamic IP address whilst fixing out the nameservers.

The option of changing the nameserver values in the router isn't available.

Any idea if this can be done?
 
Difficult to see how the suggestion of setting dns=.... in /usr/share/udhcpc/default.script can do anything useful as all it does is set a local variable, which is then ignored by any sub-process.
Looks like you'd actually need to edit the /etc/udhcpc.d/50default file instead.

And you haven't said why you want to use a different DNS resolver to the oner that your DHCP server is setting. It would be simpler to just change that (and presumably better, as all DHCP devices would then get the resolver you wish to use).
 
Last edited:

OpenViX Feeds Status

Back
Top