resolv.conf file
How I put a nameserver in resolv.config, that's is not change any time I reboot the machine, in debian?
How can I deny that the machine change what I write in resolv.conf file? |
A workaround can be:
You put in rc.local a command which copy a working resolv.conf.whatever to resolv.conf. Rc.local don't exist in Debian, but you can create it easily. |
and where I create this rc.local?
and what kind of commands I put in this file? |
I create a file in home with name
resolv.config nameserver 194.65.100.117 nameserver 194.65.5.2 that I create anather file executable with name dns (whit this commands: ###script para dns### rm -rf /etc/resolv.conf cp /home/helder/resolv.conf /etc/ when I do as #./dns the resolv.conf change, and all works Now, where I create rc.local to automatize that |
Create a file /etc/init.d/local, with this inside:
#!/bin/sh then chmod 755 /etc/init.d/local update-rc.d local start 98 2 3 4 5 . <--- don't forget the dot mkdir /etc/rc.d/ ln -s /etc/init.d/local /etc/rc.d/rc.local Tested and approved. Lamed from here: http://www.trustonme.net/didactels/81.html#local |
I had the same problem. I think it was bootscript that had overwritten the resolv.conf file everytime I started the system.
|
All times are GMT -5. The time now is 11:00 PM. |