For example, it can be implemented like this:
1. Change in Adaway 127.0.0.1 to 127.0.0.5 for forwarding.
2. Run the tcpdump:
tcpdump -i any -s 0 host 127.0.0.5 -w /tmp/dnsblock.pcap
3. generated some traffic, for example, so:
wget 44444.ru
where 44444.ru is blacklisted by Adaway
4. We get in the dump something like:
16:08:55.446532 IP 44444.ru.35318 > 44444.ru.http: Flags [s], seq 3975137463, win 32792, options [mss 16396,sackOK,TS val 3364337500 ecr 0,nop,wscale 7], length 0
16:08:55.446563 IP 44444.ru.http > 44444.ru.35318: Flags [S.], seq 1338750778, ack 3975137464, win 32768, options [mss 16396,sackOK,TS val 3364337500 ecr 3364337500,nop,wscale 7], length 0
16:08:55.446587 IP 44444.ru.35318 > 44444.ru.http: Flags [.], ack 1, win 257, options [nop,nop,TS val 3364337500 ecr 3364337500], length 0
16:08:55.446633 IP 44444.ru.35318 > 44444.ru.http: Flags [P.], seq 1:107, ack 1, win 257, options [nop,nop,TS val 3364337500 ecr 3364337500], length 106
16:08:55.446662 IP 44444.ru.http > 44444.ru.35318: Flags [.], ack 107, win 256, options [nop,nop,TS val 3364337500 ecr 3364337500], length 0
16:08:57.553569 IP 44444.ru.http > 44444.ru.35318: Flags [P.], seq 1:619, ack 107, win 256, options [nop,nop,TS val 3364339607 ecr 3364337500], length 618
16:08:57.553599 IP 44444.ru.35318 > 44444.ru.http: Flags [.], ack 619, win 266, options [nop,nop,TS val 3364339607 ecr 3364339607], length 0
16:08:57.553689 IP 44444.ru.35318 > 44444.ru.http: Flags [R.], seq 107, ack 619, win 266, options [nop,nop,TS val 3364339607 ecr 3364339607], length 0
5. Select domains from the text, remove duplicates, and save log:
cat /tmp/678.pcap | grep "http >\|https >"| awk '{print $3}'|sed s/.https/""/|sed s/.http/""/|uniq > /tmp/dnsblocklog
6. Result:
[
[email protected] etc]# cat /tmp/dnsblocklog
44444.ru
You can also apply some sort in the command.
This is an example way. Developers please add this feature. You'll probably do much better than I suggested.
---------- Post added at 04:19 PM ---------- Previous post was at 04:11 PM ----------
Quote:
Originally Posted by
ktmom
That would be called white listing and yes, this has worked for a long time. Did you carefully read that page?
Sorry for my bad English, maybe I don't understand you or you don't understand me.
Version 3.2 100% doesn't have what I'm talking about. I have not yet installed, 4.2.9, if there is something changed, it is good, if not, we do not understand each other.
In changelog, such a feature from 3.2 to 4.2.9 was not declared.
Later I will specifically update the version and see for myself.
P.S. I installed 4.2.9. And there is no such log, about which I spoke!!! There is no such functionality!
Moreover, in version 4.2.9 became just a terrible interface! Very uncomfortable. Usability has deteriorated greatly. I'm going back to version 3.2.