DietPi-Software | Several setup improvement for existing installation options
1. WiFi HotSpot ( see issue 273 )
- DNS-Server selection (like new menu under interfaces) in dietpi-config
- possibility to change DHCP area and Gateway address in dietpi-config
- possibility to change 802.11g to 802.11n via dietpi-config, if hardware support it.
2. TOR HotSpot
- DNS-Server selection (like new menu under interfaces) in dietpi-config
- possibility to change DHCP area and Gateway address in dietpi-config
- possibility to change 802.11g to 802.11n via dietpi-config, if hardware support it.
3. PiHole ( see issue 252 )
- DNS-Server selection (like new menu under interfaces) during installation, after question for static IP address.
- cronjob that will update gravity.sh (or the new
pihole -goption) with update logging - Implementing some of the "new" 2.6.2 PiHole features
@Fourdee don't want do start x-issues, so you can split suit yourself or kick them out. But it's all only ideas / suggestion, no really issues.
@k-plan All great suggestions and improvements :+1: . I will take a look into them when I start v118.
Feel free to divy out as thanks to you & @rhkean, I am getting quite cozy with my favorite distro - ARM, X64, and Virtual. Whiptail and menus are epic. Then again, I am possibly having too much fun!
@xenfomation Lol, legend :+1:. We love whiptail at DietPi hehe ;)
Linking for reference: https://github.com/Fourdee/DietPi/issues/313#issuecomment-217729027
@k-plan Going to move this to v119. v118 has too many open jobs, and still lots to do before we can release v118.
@Fourdee
Clean up for v118 release? :smiley:
No problem, it's okay (for me).
If I have some spare time at weekend, I will start with WiFi HotSpot 802.11n testing (2.4 and 5 GHz) and regulatory domain setting. (I hope so)
@k-plan
Clean up for v118 release?
Hehe, yes. There is so much going at the moment and I just want to make sure we can close all those tickets. I'am also not familiar with a 2+ week update cycle lol.
@k-plan
Will go through these, i'll update it as and when:
WiFi Hotspot - DNS-Server selection (like new menu under interfaces) in dietpi-config
Hostapd uses the DNS server of eth device. So users can change the eth DNS server to affect both.
Implementing some of the "new" 2.6.2 PiHole features
Updated Pi-Hole to latest for v119 to prep for this.
@k-plan
PiHole DNS-Server selection (like new menu under interfaces) during installation, after question for static IP address.
In dietpi-config: Changing static DNS servers will now also be applied to PiHole (if installed). This needs to be completed by the user after PiHole has been installed. I'll make a documentation note for users.
In dietpi-config: Changing static DNS servers will now also be applied to PiHole (if installed). This needs to be completed by the user after PiHole has been installed. I'll make a documentation note for users.
I've reverted this change, didn't like it, and it was a bit rushed to be honest. I've updated the online docs (http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=174#p174) for now, but i'll take a fresh look after v120 is released.
@k-plan
PiHole will automatically update the adlist on a weekly basis via /etc/cron.weekly/pihole_adlist_update
In dietpi-config: Changing static DNS servers will now also be applied to PiHole (if installed). This needs to be completed by the user after PiHole has been installed. I'll make a documentation note for users.
I've reverted this change, didn't like it, and it was a bit rushed to be honest. I've updated the online docs (http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=174#p174) for now, but i'll take a fresh look after v120 is released.
Me too. Didn't like this. Better to have independent configurations for DNS server.
PiHole will automatically update the adlist on a weekly basis via
Nice! π Will have a look, after our remote session.
@Fourdee
testing on fresh install Odroid C2 (v.122 with lighttp):
error message:
Refresh lists in dnsmasq...sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory done!
root@Odroid-C2:~# gravity.sh
:::
::: You are root.
::: Neutrino emissions detected...
:::
::: No custom adlist file detected, reading from default file... done!
:::
::: Existing pihole directory found
:::
::: Getting raw.githubusercontent.com list... List updated, transport successful!
::: Getting adblock.gjtech.net list... No changes detected, transport skipped!
::: Getting mirror1.malwaredomains.com list... No changes detected, transport skipped!
::: Getting sysctl.org list... No changes detected, transport skipped!
::: Getting zeustracker.abuse.ch list... No changes detected, transport skipped!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting hosts-file.net list... List updated, transport successful!
::: Getting raw.githubusercontent.com list... List updated, transport successful!
:::
::: Aggregating list of domains... done!
::: Formatting list of domains to remove comments.... done!
::: 78957 domains being pulled in by gravity...
::: Removing duplicate domains.... done!
::: 62492 unique domains trapped in the event horizon.
::: Formatting domains into a HOSTS file...
:::
::: Adding 9 adlist sources to the whitelist... done!
::: Running whitelist script to update HOSTS file.... 7 domains whitelisted!
::: Running blacklist script to update HOSTS file.... 0 domains blacklisted!
:::
::: Cleaning up un-needed files... done!
:::
::: Refresh lists in dnsmasq...sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory
done!
root@Odroid-C2:~# ls -lah /etc/dnsmasq.d/
total 12K
drwxr-xr-x 2 root root 4.0K Jul 3 19:54 .
drwxr-xr-x 75 root root 4.0K Jul 3 20:20 ..
-rw-r--r-- 1 root root 211 May 5 2015 README
@k-plan
From what I can tell, 01-pihole.conf is written to once, but not read from in gravity.sh. https://github.com/pi-hole/pi-hole/blob/master/gravity.sh#L316. So it doesn't really effect the update.
Either way, lets fix the error:
wget https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/01-pihole.conf -O /etc/dnsmasq.d/01-pihole.conf
Run gravity again:
gravity.sh
@Fourdee
root@Odroid-C2:~# wget https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/01-pihole.conf -O /etc/dnsmasq.d/01-pihole.conf
--2016-07-03 21:09:49-- https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/01-pihole.conf
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.12.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.12.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2205 (2.2K) [text/plain]
Saving to: β/etc/dnsmasq.d/01-pihole.confβ
/etc/dnsmasq.d/01-pihole.conf 100%[=================================================================================>] 2.15K --.-KB/s in 0s
2016-07-03 21:09:49 (9.83 MB/s) - β/etc/dnsmasq.d/01-pihole.confβ saved [2205/2205]
root@Odroid-C2:~# gravity.sh
:::
::: You are root.
::: Neutrino emissions detected...
:::
::: No custom adlist file detected, reading from default file... done!
:::
::: Existing pihole directory found
:::
::: Getting raw.githubusercontent.com list... List updated, transport successful!
::: Getting adblock.gjtech.net list... No changes detected, transport skipped!
::: Getting mirror1.malwaredomains.com list... No changes detected, transport skipped!
::: Getting sysctl.org list... No changes detected, transport skipped!
::: Getting zeustracker.abuse.ch list... No changes detected, transport skipped!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting hosts-file.net list... List updated, transport successful!
::: Getting raw.githubusercontent.com list... List updated, transport successful!
:::
::: Aggregating list of domains... done!
::: Formatting list of domains to remove comments.... done!
::: 78957 domains being pulled in by gravity...
::: Removing duplicate domains.... done!
::: 62492 unique domains trapped in the event horizon.
::: Formatting domains into a HOSTS file...
:::
::: Adding 9 adlist sources to the whitelist... done!
::: Running whitelist script to update HOSTS file.... 7 domains whitelisted!
::: Running blacklist script to update HOSTS file.... 0 domains blacklisted!
:::
::: Cleaning up un-needed files... done!
:::
::: Refresh lists in dnsmasq... done!
Look okay for now. π
@k-plan Excellent :+1: I'll get this added to patch and when installed with dietpi-software.
@Fourdee
after a reboot or dietpi-services restart , it seem to be not so easy:
root@Odroid-C2:~# gravity.sh
. . .
::: Refresh lists in dnsmasq...Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.
done!
root@Odroid-C2:~# systemctl status dnsmasq.service
β dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
ββ50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: exit-code) since Sun 2016-07-03 22:39:03 CEST; 11s ago
Process: 2810 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE)
Process: 2807 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Jul 03 22:39:03 Odroid-C2 dnsmasq[2807]: dnsmasq: syntax check OK.
Jul 03 22:39:03 Odroid-C2 dnsmasq[2810]: dnsmasq: bad address at line 34 of /etc/dnsmasq.d/01-pihole.conf
Jul 03 22:39:03 Odroid-C2 systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Jul 03 22:39:03 Odroid-C2 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jul 03 22:39:03 Odroid-C2 systemd[1]: Unit dnsmasq.service entered failed state.
root@Odroid-C2:~# journalctl -xn
-- Logs begin at Sun 2016-07-03 23:53:36 CEST, end at Mon 2016-07-04 00:10:49 CEST. --
Jul 04 00:10:49 Odroid-C2 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
-- Subject: Unit dnsmasq.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has begun starting up.
Jul 04 00:10:49 Odroid-C2 dnsmasq[6432]: dnsmasq: syntax check OK.
Jul 04 00:10:49 Odroid-C2 dnsmasq[6435]: dnsmasq: bad address at line 34 of /etc/dnsmasq.d/01-pihole.conf
Jul 04 00:10:49 Odroid-C2 dnsmasq[6435]: bad address at line 34 of /etc/dnsmasq.d/01-pihole.conf
Jul 04 00:10:49 Odroid-C2 dnsmasq[6435]: FAILED to start up
Jul 04 00:10:49 Odroid-C2 systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Jul 04 00:10:49 Odroid-C2 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
-- Subject: Unit dnsmasq.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has failed.
--
-- The result is failed.
Jul 04 00:10:49 Odroid-C2 systemd[1]: Dependency failed for Host and Network Name Lookups.
-- Subject: Unit nss-lookup.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nss-lookup.target has failed.
--
-- The result is dependency.
Jul 04 00:10:49 Odroid-C2 systemd[1]: Unit dnsmasq.service entered failed state.
Will starting from scratch.
From what I can tell, 01-pihole.conf is written to once, but not read from in gravity.sh. https://github.com/pi-hole/pi-hole/blob/master/gravity.sh#L316. So it doesn't really effect the update.
https://github.com/pi-hole/pi-hole/wiki/Changelog#25---2016-02-01
@k-plan
bad address at line 34 of /etc/dnsmasq.d/01-pihole.conf
If its not too late, can you:
cat /etc/dnsmasq.d/01-pihole.conf | sed -n 34p
@Fourdee
If its not too late, can you:
cat /etc/dnsmasq.d/01-pihole.conf | sed -n 34p
:smiley:
Yes, have experiment yesterday night a lot, but after uncomment line 34 comes the next error messages appears ...
But anyway, have a running config now. Not sure, if is a "proper solution" , but after reboot or gravity.sh or dietpi-services restart dnsmasq starts without error message and Pihole is working for now.
root@Odroid-C2:~# cat /etc/dnsmasq.d/01-pihole.conf
# Pi-hole: A black hole for Internet advertisements
# (c) 2015, 2016 by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
# http://pi-hole.net
# dnsmasq config for Pi-hole
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# If you want dnsmasq to read another file, as well as /etc/hosts, use
# this.
##addn-hosts=/etc/pihole/gravity.list
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# unnecessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link unnecessarily.
# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv
# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers from this file instead (see below), then
# uncomment this.
no-resolv
# Add other name servers here, with domain specs if they are for
# non-public domains.
##server=@DNS1@
##server=@DNS2@
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
##interface=@INT@
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
##listen-address=127.0.0.1
# Set the cachesize here.
##cache-size=10000
# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
##log-queries
##log-facility=/var/log/pihole.log
# Normally responses which come from /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
##local-ttl=300
# This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock
log-async
root@Odroid-C2:~# cat /etc/dnsmasq.conf
#/etc/dnsmasq.conf
addn-hosts=/etc/pihole/gravity.list
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=8.8.4.4
interface=eth0
listen-address=127.0.0.1
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=300
root@Odroid-C2:~# systemctl status dnsmasq.service
β dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
ββ50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: active (running) since Mon 2016-07-04 01:15:47 CEST; 12h ago
Main PID: 862 (dnsmasq)
CGroup: /system.slice/dnsmasq.service
ββ862 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u www-data -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,....
Jul 04 01:15:47 Odroid-C2 dnsmasq[856]: dnsmasq: syntax check OK.
Jul 04 01:15:47 Odroid-C2 systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.

.