2016-04-13 19:36:03 +02:00
|
|
|
dnsmasq
|
|
|
|
=======
|
2016-07-12 07:43:54 +02:00
|
|
|
|
|
|
|
[Dnsmasq][1] is a Domain Name System forwarder and Dynamic Host Configuration
|
|
|
|
Protocol server for small computer networks, created as free software.
|
|
|
|
|
2023-11-20 17:02:34 +02:00
|
|
|
## DNS Server for WORK
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ tree
|
|
|
|
├── data
|
|
|
|
│ ├── nsfw.txt
|
|
|
|
│ └── settings.conf
|
|
|
|
└── docker-compose.yml
|
|
|
|
|
|
|
|
$ docker-compose up -d
|
|
|
|
|
|
|
|
$ docker-compose kill -s SIGHUP
|
|
|
|
```
|
|
|
|
|
|
|
|
```ini
|
|
|
|
# settings.conf
|
|
|
|
|
|
|
|
no-hosts
|
|
|
|
no-resolv
|
2023-11-22 11:00:33 +02:00
|
|
|
filter-AAAA
|
2023-11-20 17:02:34 +02:00
|
|
|
cache-size=10000
|
|
|
|
server=8.8.8.8
|
|
|
|
servers-file=/etc/dnsmasq.d/nsfw.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
curl -s https://thepornbest.com/ |
|
|
|
|
htmlq -a href a |
|
|
|
|
grep '://' |
|
|
|
|
sort -u |
|
|
|
|
xargs tldextract -j |
|
|
|
|
jq -r 'select(.registered_domain!="").registered_domain' |
|
|
|
|
sort -u |
|
|
|
|
sed 's@.*@server=/&/@' > data/nsfw.txt
|
|
|
|
```
|
|
|
|
|
2016-07-12 07:43:54 +02:00
|
|
|
[1]: http://www.thekelleys.org.uk/dnsmasq/doc.html
|