You are not logged in.
A few new tidbits!
Version 0.11.1 (13.09.2012)
*accumulated fixes with feedback (thanks tlvince)
*fixed hostsblock-urlcheck's misidentification of colons in urls
Check out hostsblock for system-wide ad- and malware-blocking.
Offline
After I recently switched to a 64-bit system, my kwakd has been failing to start from time to time.
However, I can get it up and running again with "sudo /usr/local/bin/kwakd -b -p 80" and then "sudo /etc/init.d/dnsmasq restart". This may suggest a problem in the file which contains this command under "/etc/init.d" but I don't think it has changed.
Does anyone have any idea about this?
Offline
I've found it!
Apparently, I forgot the last step of manually installing kwakd:
sudo update-rc.d kwakd defaults
This was essential to make /etc/init.d/kwakd start.
Offline
I've found it!
Apparently, I forgot the last step of manually installing kwakd:
sudo update-rc.d kwakd defaults
This was essential to make /etc/init.d/kwakd start.
About kwakd.
1) I have migrated to systemd and cannot start it with initscripts any more.
2) kwakd recently changed to allow been executed as a normal user instead of root.
I start it from the desktop environment autostart with "kwakd -b -p 80"
Offline
1) I have migrated to systemd and cannot start it with initscripts any more.
kwakd maintainer here. I've just updated the package to include a systemd service.
Offline
ontobelli wrote:1) I have migrated to systemd and cannot start it with initscripts any more.
kwakd maintainer here. I've just updated the package to include a systemd service.
I have just updated AUR packages and notice your kwakd update tlvince.
Thank you for your lightning fast response.
Offline
Does hostsblock hide the elements in the page? Or will it just display blank, white space?
Offline
As far as I know, hostsblock merely blocks access, in which case web browsers merely return an error message, while kwakd provides a blank/white space instead of error message which may also increase speed in addition to a better appearance.
Offline
I don't get it. I followed all the installation steps, including dnsmasq and kwakd, both services are running, hosts.adblock is populated, and websites are still riddled with ads...
Offline
Did you add hosts.adblock to dnsmasq as an additional host file?
Offline
I don't get it. I followed all the installation steps, including dnsmasq and kwakd, both services are running, hosts.adblock is populated, and websites are still riddled with ads...
You need to configure /etc/hostsblock/rc.conf and /etc/dnsmasq.conf
if you use /etc/hosts.block you need to configure
addn-hosts=/etc/hosts.block
listen-address=127.0.0.1
read the wiki
http://wiki.archlinux.org/index.php/Dnsmasq
Offline
Unfortunately, I have this all already done:
/etc/dnsmasq.conf
listen-address=127.0.0.1
addn-hosts=/etc/hosts.adblock
/etc/hostsblock/rc.conf
logfile="/var/log/hostsblock.log"
cachedir="/var/cache/hostsblock"
tmpdir="/dev/shm"
# FINAL HOSTSFILE. The final hosts file that combines together all downloaded
# blocklists. If not using a dns caching daemon like dnsmasq, this should be
# /etc/hosts. Include hosts file entries which you want to maintain in the
# "hostshead" entry, such as your loopback device (e.g. 127.0.0.1 localhosts)
hostsfile="/etc/hosts"
#hostsfile="/etc/hosts" # If not using a dns caching daemon
redirecturl="127.0.0.1"
redirects="0"
postprocess(){ #
/etc/rc.d/dnsmasq restart # For dnsmasq under initscripts
} #
hostshead="0"
blacklist="/etc/hostsblock/black.list"
whitelist="/etc/hostsblock/white.list"
blocklists=(
## HIGHLY RECOMMENDED LISTS
'http://winhelp2002.mvps.org/hosts.zip' # anti-ad and anti-malware list (winhelp2002.mvps.org/hosts.htm)
'http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&mimetype=plaintext' # anti-ad (pgl.yoyo.org/adservers/)
'http://hosts-file.net/download/hosts.zip' # hpHosts main anti-ad and anti-malware (hosts-file.net/)
'http://www.malwaredomainlist.com/hostslist/hosts.txt' # anti-malware (www.malwaredomainlist.com/)
'http://hosts-file.net/ad_servers.asp' # anti-ads-only version of hpHosts main list (hosts-file.net)
## RECOMMENDED LISTS
'http://hosts-file.net/hphosts-partial.asp' # hpHosts inter-release (hosts-file.net/)
'http://hostsfile.org/Downloads/BadHosts.unx.zip' # anti-malware (hostsfile.org/hosts.html)
'http://hostsfile.mine.nu/Hosts.zip' # anti-ad (hostsfile.mine.nu)
'http://someonewhocares.org/hosts/hosts' # anti-ad and anti-malware (someonewhocares.org/hosts/)
'http://sysctl.org/cameleon/hosts' # anti-ad (sysctl.org/cameleon/)
'http://www.ismeh.com/HOSTS' # anti-ads for mobile devices
rc.conf
DAEMONS=(@syslog-ng dbus acpid sensors @hddtemp netfs @crond @wicd alsa @hdapsd @bluetooth dnsmasq kwakd irqbalance cpufreq slim)
Offline
Unfortunately, I have this all already done:
hostsfile="/etc/hosts"
That is wrong. Must be.
hostsfile="/etc/hosts.block"
You need to have in /etc/hosts
127.0.0.1 localhost.localdomain localhost "YOUR HOSTNAME"
::1 localhost.localdomain localhost "YOUR HOSTNAME"
Last edited by ontobelli (2012-10-08 20:23:18)
Offline
I think you meant /etc/hosts.adblock? In any case, it didn't help.
Offline
It seems you've got hostsblock filename wrong in both cases, which should be:
/etc/dnsmasq.conf ===> addn-hosts=/etc/hosts.block
/etc/hostsblock/rc.conf ===> hostsfile=/etc/hosts.block
Offline
hosts.block is 8mb in size. hosts.adblock is 8/3mb. Also, in the later, the ip addresses are all 0.0.0.0 while in the former: 127.0.0.1
AFAIK, hostsblock utility uses hosts.adblock file. Am I wrong?
Offline
It's all explained here: http://gaenserich.github.com/hostsblock/
The file "/etc/hostsblock/rc.conf" has these lines by default:
hostsfile="/etc/hosts.block"
#hostsfile="/etc/hosts" # If not using a dns caching daemon
You have apparently changed this part, which you shouldn't have.
You should also modify "/etc/dnsmasq.conf" as this:
addn-hosts=/etc/hosts.block
The file "hosts.adblock" is probably a leftover from some other adblocking tool used before (or produced while thinkering with the hostsblock script files?), which I guess can be deleted.
Offline
Unfortunately, it didn't change a thing. For example, onet.pl is still riddled with ads.
Offline
I think you should test if the "/etc/hosts.block" file is being used by your system for DNS purposes.
For example, you can pick a website from there (e.g. www.1000downloads.com, if this is in your list) and check if your browser displays it.
If it is displayed, there may be something wrong with your installation.
Offline
Check the permissions of "/etc/hosts.block".
In my case, I noticed hostsblock created it as readable by root only (-rw-------), so dnsmasq (which runs as the "dnsmasq" user) couldn't read it, thus nothing was being blocked.
"sudo chmod a+r /etc/hosts.block" should do the trick.
Hope it helps.
Offline
sadi, Yes, this page is being displayed. But I don't know what else can I do to try to fix it. Everything seems right.
megadriver, Yeah, thanks. But it didn't - permissions were fine.
I am using dhclient, if it makes any difference.
Offline
In order to identify where the problem is perhaps you might uninstall dnsmasq and kwakd, and first try using only the file "/etc/hosts" to do the blocking by simply copying and pasting the entire contents of the file /etc/hosts.block" underneath the system entries in your hosts file, and restarting your computer.
If the problem is still there, there might be something in your network configuration that needs to be fixed, which is beyond me...
Offline
Ok, that worked. So how do I get dnsmasq to work now?
Offline
So the problem was in dnsmasq configuration.
You can now restore your hosts and hosts.block files in previous state.
Simply install dnsmasq, and then only make 2 changes in its configuration file "/etc/dnsmasq.conf":
listen-address=127.0.0.1
addn-hosts=/etc/hosts.block
and then restart, it should work.
Offline
Don't forget to start dnsmasq.
Offline