summarylogtreecommitdiffstats
path: root/configuration
blob: 29c72e0bc146c0c580104e83c7824efd58e7c010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Pi-hole Archlinux configuration instructions
Standalone version
rev. 0.4

It is possible to add custom ad-list server in /etc/pihole/adlists.list

Instructions below assume ArchLinux default system config files are untouched


A) First install steps

  1) edit your /etc/resolvconf.conf and uncomment name_servers line (last line), update resolvconf:

  # sed -i 's|#name_servers=127.0.0.1|name_servers=127.0.0.1|' /etc/resolvconf.conf
  # resolvconf -u

  *** if you already use dnsmasq and it's functional

    2) copy pi-hole include config lines in right place

    # mkdir /etc/dnsmasq.d
    # cp /etc/pihole/configs/dnsmasq.include /etc/dnsmasq.d/01-pihole.conf

    3) edit your /etc/dnsmasq.conf to uncomment last line (including new pi-hole config lines)

    # sed -i 's|#conf-dir=/etc/dnsmasq.d/,\*.conf|conf-dir=/etc/dnsmasq.d/,\*.conf|' /etc/dnsmasq.conf

  *** end if

  *** if you installed dnsmasq with this package for the first time

    4) backup original dnsmasq config file and copy pi-hole one

    # cp /etc/dnsmasq.conf /etc/dnsmasq.orig
    # cp /etc/pihole/configs/dnsmasq.main /etc/dnsmasq.conf
    # mkdir /etc/dnsmasq.d
    # cp /etc/pihole/configs/dnsmasq.include /etc/dnsmasq.d/01-pihole.conf

  *** end if


  5) enable and start dnsmasq service

  # systemctl reenable dnsmasq.service
  # systemctl restart dnsmasq.service


B) Upgrade steps

  *** if updating you see a post install message like this: " ==> ver. -some version-: dnsmasq conf file is changed, please follow upgrade steps "
  
    1) update dnsmasq conf file

    # [ -f /etc/dnsmasq.d/pihole.conf ] && cp /etc/pihole/configs/dnsmasq.include /etc/dnsmasq.d/pihole.conf
    # [ -f /etc/dnsmasq.orig ] && cp /etc/pihole/configs/dnsmasq.complete /etc/dnsmasq.conf

    2) manage and restart dnsmasq service

    # systemctl reenable dnsmasq.service
    # systemctl restart dnsmasq.service

  *** end if


C) Uninstall steps

  # systemctl stop dnsmasq.service
  # systemctl disable dnsmasq.service
  # sed -i 's|name_servers=127.0.0.1|#name_servers=127.0.0.1|' /etc/resolvconf.conf
  # resolvconf -u
  # [ -f /etc/dnsmasq.d/pihole.conf ] && rm /etc/dnsmasq.d/pihole.conf
  # [ -f /etc/dnsmasq.orig ] && cp /etc/dnsmasq.orig /etc/dnsmasq.conf