-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry Pi
Program | Application | Link |
---|---|---|
SD Card Formatter | Format SD Cards | https://www.sdcard.org/downloads/formatter/ |
Balena Etcher | Flash OS images to SD cards | https://www.balena.io/etcher/ |
Win32DiskImager | write a raw disk image to a removable device or backup a removable device | https://sourceforge.net/projects/win32diskimager/ |
Putty | PuTTY is an SSH and telnet client | https://www.putty.org/ |
WinSCP | WinSCP is a SFTP client and FTP client | https://winscp.net/eng/download.php |
Select Menu and set user, password, ssh and WiFi (optional)
pi//raspberry user//password does not work anymore!
create pi as a standard user! see pihole
- create
wpa_supplicant.conf
in/boot
- use any text editor and edit the
wpa_supplicant.conf
file and add:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE
network={
scan_ssid=1
ssid="SSID"
psk="PASSWORD"
key_mgmt=WPA-PSK
}
- create a file
ssh
in/boot
- Use Putty and the RPi IP-adress to connect via SSH
raspi-config
- Change Timezone and setup a new Hostname
passwd
sudo passwd
sudo apt-get update && sudo apt-get upgrade -y && sudo apt autoremove -y && clear
-
crontab -e
if the script should run as pi user -
sudo crontab -e
if the script should run with root privileges
example:
#variables
home_dir = /home/pi/scripts/
logfile_dir = /home/pi/logfiles/
timestamp=date +20%y_%m_%d_%H_%M_%S
# update pihole system at reboot
@reboot python ${home_dir}update_pihole.py >> ${logfile_dir}log_update_pihole_reboot_$(${timestamp}).log 2>&1
# update pihole system every 7days at 3am
0 3 */7 * * python ${home_dir}update_pihole.py >> ${logfile_dir}log_update_pihole_7days_$(${timestamp}).log 2>&1
get full cron log
cd /var/log
cat syslog.1 syslog | grep CRON
https://askubuntu.com/questions/222512/cron-info-no-mta-installed-discarding-output-error-in-the-syslog
This version works flawless!
0 3 * * * cmd >> /some/log/file 2>&1
example:
#every 7days at 3:00 + write to a logfile
0 3 */7 * * python /home/pi/test.py >> /home/pi/test.log 2>&1
Achtung es muss ein Nutzer Pi vorhanden sein!
Seit einiger Zeit muss über den RaspberryPi Imager explizit ein Nutzer vergeben werden!
https://pi-hole.net/
nano /etc/pihole/pihole-FTL.conf
- add
BLOCKINGMODE=IP
to file
wget https://www.internic.net/domain/named.root -qO- | sudo tee /var/lib/unbound/root.hints
Youtube Link
Android apps are allowed by default to use an own DNS-server.
A workaround is to block port 53 and 853 on the Router
Internet -> Filter -> Listen -> Netzwerkanwendung (Dropdown-Menü)
Internet -> Zugangsdaten -> DNS-Server
Heimnetz -> Netzwerk -> Netzwerkeinstellungen -> IPv4-Einstellungen
Free service: NoIP
- register and setup
Tutorial (sempervideo):
Video 2
Video 3
Video 4
Install for RPi:
https://github.com/Nyr/openvpn-install
Achtung: die noip adresse als public ip angeben xyz@ddns.net
nano /etc/rc.local
- add
/usr/local/bin/noip2 &
beforeexit 0