conformal / adsuck Goto Github PK
View Code? Open in Web Editor NEWA small DNS server, used primarily for blocking malicious sites and ads.
A small DNS server, used primarily for blocking malicious sites and ads.
Version 2.5.0 and 2.4.2 seem to suffer from this.
Basically nslookup / dig / adsuck seem to resolve fine, but other utilities like ping seem to not be able to.
It only seems to do this for "www.youtube.com" and "talkgadget.google.com"
My config looks like this:
adsuck_flags="-c /var/adsuck -f /viles/resolv.conf /files/hosts.small"
Tho I have been debugging with ( if I add in -d, I can see what seems to be a correct response ):
adsuck -v -D -c /var/adusck -f /files/resolv.conf /files/hosts.small"
I added some debug to line 401 of adsuck.c - and it isn't falling into the spoofquery function, and I have no regex stuff defined.
My router ( openbsd 5.2 ) is the machine running adsuck, and its resolver looks like:
nameserver 8.8.8.8
nameserver 8.8.4.4
The clients that are unable to resolve are OpenBSD current, ChromeOS ( beta ).
There are a several of problems in udp_bind() that are triggered by using the -l (ell) flag.
The 'addr' field only has space for IPv4 addresses but you attempt to call inet_pton(AF_INET6...). This corrupts the stack and coredumps the process on my machine.
Even if an INET6 address could be parsed, you are hardcoding AF_INET everywhere else.
The sin_len and sin_zero fields of sockaddr_in are not being set. One (or both) of these are now causing bind to consistently return errno 49 (can't assign requested address) in OpenBSD 5.6. This worked in 5.5, though I haven't figured out what changed.
3804 adsuck CALL socket(PF_INET,0x2<SOCK_DGRAM>,IPPROTO_IP)
3804 adsuck RET socket 3
3804 adsuck CALL bind(0x3,0xcfbc8594,0x10)
3804 adsuck STRU struct sockaddr { AF_INET, 127.0.0.1:53 }
3804 adsuck RET bind -1 errno 49 Can't assign requested address
When using -l 127.0.0.1
I get the following error on lookups that are in the hosts
file:
can't create additional section: Syntax error, could not parse the RR's rdata
Entries in filter
or 'normal' domains work fine. If I leave out -l
(and bind to all addresses) everything works fine as well.
This error seems to occur at line 477:
status = ldns_rr_new_frm_str(&myasrr, buf, 0, NULL, &prev);
I looked at fixing it, but wasn't able to :-(
I'm using Adsuck 2.5.0 on Arch Linux. I have the same problem with a checkout from git.
Adsuck doesn't seem to be working because I can browse to www.anxo.com which is a black listed site. (I did a flushdns). I copied the resolv.conf file so it knows about the ISP DNS servers.
If I kill adsuck then I can't resolve any hostnames from my windows PC so it is being used to resolve DNS. When I enable adsuck again I get DNS back, but it's not blocking ad sites etc.
After a while I also notice that DNS stops working (can still ping 8.8.8.8) and I see these entries in the system log. Looks like adsuck crashes.
The first line was included to show the time that it loaded, and that number of entries were loaded.
The second entry I notice has weird time stamps as the adjacent log entries either side are hours after the cannot fork entry. I cut some of the log lines out because they were just repeated.
The third line is when I lose DNS. Only way to get it working is to kill adsuck and run it again
Oct 27 12:36:18 adsuck[2115]: total entries: 237974
Oct 28 07:13:31 adsuck[2115]: cannot fork: Cannot allocate memory
Oct 28 17:33:06 adsuck[2115]: can't convert wire packet to struct
I'm running adsuck with the following command:
adsuck -d -l 127.0.0.1 -c /opt/etc/adsuck -f resolv.conf -p 65053 -u admin Hosts.pub Hosts.trc Hosts.rsk
My dnsmasq.conf file points to the 127.0.0.1 on port 65053
Linux 2.6.22.19 #2 Thu Oct 3 00:36:10 EDT 2013 mips GNU/Linux
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.