Updating DHCP with an extra nameserver
Hello Linux Guru's,
Im facing a little problem on my debian box, My ISP connection is with DHCP and receieves its ip and nameserver from my provider, this is all working fine but i also run my own bind for some local names.
Now at first i had added my own machine to /etc/resolv.conf and this worked fine but after a while i found out that the dhcpclient updates this file (obviously) but also removes my custom ns i added.
After searching i came across some information on how to hook scripts using
/etc/dhcp3/dhclient-enter-hooks.d it involved overriding the function
however when i do this the nameserver from the ISP are no longer updated to my resolv.conf and this is not what i want.
if i use my nameservers alone, i can no longer relove names on the net ofcourse and im not so experienced yet to configure bind dynamicaly to forward to my ISP
Basically what i want is my own nameserver always standard first and appended to that the ns of my ISP.
Maybe someone could point me in the right direction.
I've had a similar problem in the past. I found this which offers a few different methods for dealing with your problem:
So this does not really solve my problem.
However the little line echo "doing nothing to resolv.conf" in the link you posted did bring me to an idea
i could use grep like gettig ip from ifconfig
then write my own NS first then the NS from grep to resolv.conf
however ill have to figure out how i fix that because it seems ifconfig doesnt show ns by defualt
Thank you i guess i manage from here i was on the right way.
here is my override function
it works ok but the problem im facing is how do i get the nameservers for my isp without taking it from resolv.conf i tried grep with ifconfig but it does not seems to be specified there
|All times are GMT -5. The time now is 03:03 AM.|