Skip to content

Instantly share code, notes, and snippets.

View SkaTeMasTer's full-sized avatar

$hawn Reimerdes SkaTeMasTer

View GitHub Profile
@SkaTeMasTer
SkaTeMasTer / resolv.conf
Created July 19, 2017 06:55
RPiv3 2017 latest scripts. Fix /etc/resolv.conf for correct DNS name servers + IPv6
# set local domain
search local
#__________________________{openDNS default here}
# OpenDNS IPv4 nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220
# OpenDNS IPv6 nameservers
nameserver 2620:0:ccc::2
@SkaTeMasTer
SkaTeMasTer / dietpi.txt
Last active March 7, 2017 11:21
Pi-Hole centric auto-install "dietpi.txt" to configure new install
#Modifcations to /boot/* files, will not be saved when powered on.
#Please ensure you edit from the DietPi-RamDisk location /DietPi/*
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# 1st run settings
# All settings below will be applied on the 1st boot of DietPi, ONCE.
#------------------------------------------------------------------------------------------------------
# >> Networking Options -----------------------------
#If both Ethernet and Wifi are enabled, Wifi will take priority and Ethernet will be disabled.
@SkaTeMasTer
SkaTeMasTer / gist:4ddff8c2bc68c20c18a0ea28d3657fd1
Created February 20, 2017 02:08
Crazy way to "initalize" Amazon Lightsail server password. You must issue the followin commands to confirm SSH certs and allow access to apps like Wordpress and mySQL
Note: The default username for WordPress application is 'user'.
To retrieve the password for user you need to SSH the server and type
cat bitnami_application_password
@SkaTeMasTer
SkaTeMasTer / tcpdumping-pihole
Last active February 14, 2017 14:14
Debugging PiHOLE w/TCPDUMP
# install utils
sudo apt-get -y install libpcap0.8 tcpdump
# watch port 53 (DNS) with a specific client
sudo tcpdump -npi eth0 -vvv host 192.168.1.9 and port 53
@SkaTeMasTer
SkaTeMasTer / lighttpd.conf
Created February 14, 2017 13:21
PIHOLE config for lighthttpd
# sudo nano /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_accesslog",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
@SkaTeMasTer
SkaTeMasTer / fstab
Created February 13, 2017 09:39
NFS Mounting of Synology NAS drive
192.168.1.40:/volume1/BackupPi /media/nas-backup nfs defaults,x-systemd.automount 0 0
@SkaTeMasTer
SkaTeMasTer / multi-tail.sh
Created February 13, 2017 09:24
Script tails all logs from RPi
apt-get install multitail
multitail /var/log/syslog /var/log/auth.log
+ display log files in colors,
+ scroll back in a log file,
+ search inside log file,
+ merge mutliple log files effectively
@SkaTeMasTer
SkaTeMasTer / log-rotate
Created February 13, 2017 08:51
Log rotate is important to keep the SD cards on Raspberry pi from corruption, disable any logging when possible (after debugging)
Logfile RoATING file operations using UNIX logrotate utility.
=============================================
+ Rotate the log file when file size reaches a specific size
+ Continue to write the log information to the newly created file after rotating the old log file
+ Compress the rotated log files
+ Specify compression option for the rotated log files
+ Rotate the old log files with the date in the filename
+ Execute custom shell scripts immediately after log rotation
+ Remove older rotated log files
@SkaTeMasTer
SkaTeMasTer / pi-hole-debug.txt
Created February 13, 2017 06:31
This is the status required for pihole to work. You need to install dependencies and hack some.
IP Addresses of this Pi:
127.0.0.1
10.124.161.101
Gateway check:
ok
#######################################
######## Whitelist Comparison #########
#######################################
@SkaTeMasTer
SkaTeMasTer / opennic
Created February 12, 2017 05:39
Open NIC Project -- get local DNS Servers -- https://www.opennicproject.org/nearest-servers/
output:
Home › Your nearest OpenNIC DNS servers
Your nearest OpenNIC DNS servers
Are…
45.56.117.118 (ns6.ga.us) -- 99.42% uptime
138.197.25.214 (ns10.ny.us) -- 94.79% uptime
96.90.175.167 (ns4.co.us) -- 98.10% uptime
87.98.175.85 (ns10.fr) -- 98.75% uptime