1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/ftldns/README.md

51 lines
1.4 KiB
Markdown
Raw Normal View History

2023-11-26 10:26:19 +02:00
FTLDNS
==========
[FTLDNS][1] (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole®'s Web interface.
2023-11-26 17:08:50 +02:00
## Up and Running
```bash
$ docker compose up -d
$ dig @127.0.0.1 -p 53 www.youtube.com
2024-02-27 13:20:48 +02:00
$ docker compose exec ftldns bash
>>> pihole-FTL sql -h gravity.db
.schema domainlist
insert into domainlist(type, domain) values (3, '(\.|^)youtube\.com$');
.quit
2024-02-28 04:58:21 +02:00
>>> pihole --regex '(\.|^)baidu\.com$'
>>> pihole --wild 'qq.com'
2024-02-27 13:20:48 +02:00
>>> pihole-FTL regex-test www.baidu.com
2024-02-28 04:58:21 +02:00
>>> pihole --wild -d youtube.com
>>> pihole --regex -l
Displaying regex blacklist:
1: (\.|^)baidu\.com$ (enabled, last modified Tue, 27 Feb 2024 11:17:59 +0000)
2: (\.|^)qq\.com$ (enabled, last modified Tue, 27 Feb 2024 11:22:17 +0000)
>>> pihole -c
|¯¯¯(¯)_|¯|_ ___|¯|___ Core: API Offline
| ¯_/¯|_| ' \/ _ \ / -_)
|_| |_| |_||_\___/_\___|
——————————————————————————————————————————————————————————
2024-02-27 13:20:48 +02:00
>>> exit
2023-11-26 17:08:50 +02:00
2024-02-27 11:10:49 +02:00
$ docker compose kill -s RTMIN ftldns
2023-11-26 17:08:50 +02:00
2024-02-28 04:58:21 +02:00
$ dig @127.0.0.1 -p 53 www.baidu.com
2023-11-28 15:34:22 +02:00
$ telnet 127.0.0.1 4711
>version
>stats
>top-domains (15)
>top-clients
>getallqueries-client 2.3.4.5
>quit
2023-11-26 17:08:50 +02:00
```
2024-02-27 13:20:48 +02:00
> Read more about [domainlist][2] and [telnet-api][3].
2023-11-28 15:34:22 +02:00
2023-11-26 10:26:19 +02:00
[1]: https://github.com/pi-hole/FTL
2024-02-27 13:20:48 +02:00
[2]: https://docs.pi-hole.net/database/gravity/#domain-tables-domainlist
[3]: https://docs.pi-hole.net/ftldns/telnet-api/