On the ssd card:
touch ssh
Log in:
ssh [email protected]
sudo raspi-config
then:
2 Network Options > N1 Hostname > pihole
5 Interfacing Options > P2 SSH > yes
echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' | sudo tee /etc/apt/apt.conf.d/01norecommend
sudo apt update
sudo apt full-upgrade
Set static ip:
sudo vi /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.4.1/24
nohook wpa_supplicant
sudo systemctl daemon-reload
sudo service dhcpcd restart
Set as wifi ap:
sudo apt install hostapd
sudo vi /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=0wa
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=abcdefgh
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
sudo chmod 600 /etc/hostapd/hostapd.conf
sudo vi /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo systemctl start hostapd
Add routing and masquerade:
sudo vi /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
sudo vi /etc/rc.local
iptables-restore < /etc/iptables.ipv4.nat
Install:
wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh
Post-install configuration:
pihole admin -i all
pihole admin -i local
Enable DHCP server:
http://192.168.10.69/admin/settings.php?tab=piholedhcp
Repair/reconfigure:
sudo vi /etc/pihole/setupVars.conf
pihole reconfigure
Update:
pihole update
Change pi
user password:
passwd
Change wifi password:
sudo vi /etc/hostapd/hostapd.conf
Change pi-hole admin password:
pihole admin -p
sadly not working anymore