Browse Source

migrate-service-from-github

pull/3/head
fedy95 5 years ago
parent
commit
0798bbeb69
  1. 1
      .gitignore
  2. 62
      README.md
  3. 28
      docker-compose.yml

1
.gitignore

@ -0,0 +1 @@
/etc

62
README.md

@ -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
```

28
docker-compose.yml

@ -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