migrate-service-from-github
#3
Merged
fedy95
merged 1 commits from migrate-service-from-github
into master
5 years ago
3 changed files with 90 additions and 1 deletions
-
1.gitignore
-
62README.md
-
28docker-compose.yml
@ -0,0 +1 @@ |
|||
/etc |
@ -1,2 +1,62 @@ |
|||
# pi-hole |
|||
### info |
|||
- [docker-pi-hole](https://github.com/pi-hole/docker-pi-hole) |
|||
- [pi-hole](https://github.com/pi-hole/pi-hole) |
|||
|
|||
### run |
|||
```shell script |
|||
# for check a port 53 |
|||
netstat -ntlp | grep LISTEN |
|||
|
|||
# resolv.conf |
|||
ll /etc/resolv.conf |
|||
lrwxrwxrwx 1 root root 39 Apr 23 07:33 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf |
|||
|
|||
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf |
|||
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf' |
|||
systemctl restart systemd-resolved |
|||
|
|||
docker-compose up -d |
|||
``` |
|||
|
|||
### debug |
|||
```shell script |
|||
docker-compose logs -f pihole |
|||
|
|||
docker exec -it pihole /bin/sh |
|||
|
|||
# change password |
|||
pihole -a -p |
|||
|
|||
# show password |
|||
docker logs pihole | grep random |
|||
``` |
|||
|
|||
### windows-client debug |
|||
```shell script |
|||
ipconfig /flushdns |
|||
``` |
|||
|
|||
```shell script |
|||
nslookup pi.hole |
|||
|
|||
## correct response |
|||
: pihole |
|||
Address: 192.168.1.49 |
|||
``` |
|||
|
|||
```shell script |
|||
nslookup pi.hole 192.168.1.49 |
|||
|
|||
## correct response |
|||
: pi.hole |
|||
Address: 192.168.1.49 |
|||
``` |
|||
|
|||
```shell script |
|||
nslookup flurry.com |
|||
|
|||
## correct response |
|||
: flurry.com |
|||
Addresses: :: |
|||
0.0.0.0 |
|||
``` |
@ -0,0 +1,28 @@ |
|||
version: "3" |
|||
|
|||
services: |
|||
pihole: |
|||
image: pihole/pihole:v5.1.2 |
|||
container_name: pihole |
|||
hostname: pihole |
|||
restart: always |
|||
|
|||
volumes: |
|||
- ./etc/dnsmasq.d/:/etc/dnsmasq.d/ |
|||
- ./etc/pihole/:/etc/pihole/ |
|||
expose: |
|||
- "443" |
|||
ports: |
|||
- "53:53/tcp" |
|||
- "53:53/udp" |
|||
- "67:67/udp" |
|||
- "3006:80" |
|||
cap_add: |
|||
- NET_ADMIN |
|||
dns: |
|||
- 127.0.0.1 |
|||
- 1.1.1.1 |
|||
|
|||
environment: |
|||
- TZ=Europe/Moscow |
|||
- ServerIP=192.168.1.49 |
Reference in new issue