Closed Sadi58 closed 9 years ago
Could you post your hostsblock.conf?
As a side note, default hostsblock.conf should have dnscacher
entry.
After adding it manually and setting to dnsmasq
or auto
it worked.
@bjauy 1) Please can you explain how to add dnscacher entry to hostsblock.conf? I have added the following but still no luck:
postprocess(){ #
/etc/init.d/dnsmasq restart # For dnsmasq under initscripts
}
2) Maybe I also need to know how to set it to dnsmasq or auto I can't see anything about these settings in ReadMe or hostsblock.conf files :-/
I have simply put
dnsmasq="dnsmasq"
in hostsblock.conf. There was no such variable in the file earlier.
@bjauy
Thanks, but this made no difference here. When I use dnscacher="dnsmasq"
instead (or "auto"
), I get this message:
DHCP CLIENT NOT FOUND OR NOT OPERATIONAL. EXITING...
Weird, because I can't find such message in the code (I'm using latest git revision).
Have you tried running hostsblock with -v 3
or -v 4
parameter? It will print more messages which could help you diagnose source of the problem.
Thanks a lot @bjauy :-)
Finally got it working!
1) Apparently the cause of this second problem was that my system has /etc/dhcp/dhclient.conf
instead of /etc/dhclient.conf
specified in hostsblock-common.sh
.
2) After creating a symlink there, I also had to uncomment the line prepend domain-name-servers 127.0.0.1;
Now I also have a working copy of this latest version of hostsblock with 3 minor amends :-)
pass on the amends so that future versions can include more distribution-agnostic code.
Jacob A. van der Kolk http://personal.psu.edu/jav209 Lecturer in German Ph.D. Candidate in German Literature and Culture, ABD Department of Germanic and Slavic Languages and Literatures The Pennsylvania State University jav209@psu.edu PGP Public Key http://www.personal.psu.edu/jav209/jvdk.gpg (plaintext http://www.personal.psu.edu/jav209/jvdk.asc)
2015-01-28 4:23 GMT-05:00 Sadi Yumuşak notifications@github.com:
Thanks a lot @bjauy https://github.com/bjauy :-) Finally got it working! 1) Apparently the cause of this second problem was that my system has /etc/dhcp/dhclient.conf instead of /etc/dhclient.conf specified in hostsblock-common.sh. 2) After creating a symlink there, I also had to uncomment the line prepend domain-name-servers 127.0.0.1; Now I also have a working copy of this latest version of hostsblock with 3 minor amends :-)
— Reply to this email directly or view it on GitHub https://github.com/gaenserich/hostsblock/issues/7#issuecomment-71803723.
Conclusion:
1) The file hostsblock.conf
should perhaps also include an entry like this:
#dnscacher="dnsmasq" # This should be uncommented when using dnsmasq as dnschacher
2) The file hostsblock-common.sh
may perhaps support the dhcp client location in debian systems by performing check_dhclient_config
also at /etc/dhcp/dhclient.conf
3) Users may be warned somewhere that the line #prepend domain-name-servers 127.0.0.1;
in dhclient.conf
should be uncommented
Should be fixed now through 6c67687139be666b722caad671970b452bf0e36a.
Thanks, I can confirm that it works fine now :-) Do you think the item 3 above should be included in the ReadMe or elsewhere?
in stdout/err. I was hoping to cut back a bit on how verbose the comments are in our config files. Am 24.04.2015 10:02 schrieb "Sadi Yumuşak" notifications@github.com:
Thanks, I can confirm that it works fine now :-) Do you think the item 3 above should be included in the ReadMe or elsewhere?
— Reply to this email directly or view it on GitHub https://github.com/gaenserich/hostsblock/issues/7#issuecomment-95943266.
While testing the new pre-alpha version I get the error "USING no DNSCACHER, BUT THE 'hostsfile' VARIABLE IS NOT SET TO /etc/hosts" But I am using DNSCACHER.