Tiny Core Base > TCB Tips & Tricks

How to configure nameservers of choice with udhcpc

(1/1)

tinypoodle:
In case you prefer to define nameservers of your choice (e.g. public DNS servers), rather than what is predefined by your dhcp server, here is how to achieve this by using udhcpc:

1. Open /usr/share/udhcpc/default.script as root in the editor of your choice.

2. After the first line which is commented out, insert a line as in following example:

--- Code: ---dns="8.8.8.8 8.8.4.4"
--- End code ---
Note: The specific upper IP's would be google's public DNS servers and hereby serve just as an example and by no means as a recommendation.

3. Add the modified udhcpc script to your backup list:

--- Code: ---echo usr/share/udhcpc/default.script >>/opt/.filetool.lst
--- End code ---

4. Do a backup, just in case   ;)

Note: This method of course will only influence instances of udhcpc which run after restoring the backup, so probably not in cases where a dhcpc lease is automatically gained at boot time. Of course the modified file could also be included in a remaster, in that case it would even be in effect at boot time.

tinypoodle:
For more examples regarding configuration of udhcpc see also here:
http://git.busybox.net/busybox/tree/examples/udhcp

Navigation

[0] Message Index

Go to full version