mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
docs: add READMEs and wiki documentation for all directories
- Add comprehensive wiki documentation under .github/wiki/ (19 articles) - Add READMEs to directories that lacked them - Fix merge conflict markers in existing READMEs - Update root readme.md with improved structure Co-authored-by: Jarvis <jarvis@wickedyoda.local>
This commit is contained in:
1 parent
b40aaf6f0e
commit
0c62f7495a
42 files changed
+4501
-865
No files matched your search
@@ -0,0 +1,148 @@
|
||||
# Core Scripts
|
||||
|
||||
This wiki documents the main automation scripts in the repository root.
|
||||
|
||||
---
|
||||
|
||||
## `update-from_repo.sh`
|
||||
|
||||
Bash script to clone/update the public-setupfiles repository.
|
||||
|
||||
**Location:** Repository root
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./update-from_repo.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. Auto-installs Git if not present (Debian/Ubuntu/OpenWrt)
|
||||
2. Clones `https://github.com/wickedyoda/public-setupfiles.git`
|
||||
3. Sets executable permissions on all files
|
||||
4. Supports re-running to update existing clones
|
||||
|
||||
**Options:** None (simple script)
|
||||
|
||||
---
|
||||
|
||||
## `update-from_repo.py`
|
||||
|
||||
Python version of the repository sync script.
|
||||
|
||||
**Location:** Repository root
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 update-from_repo.py
|
||||
```
|
||||
|
||||
**Dependencies:** None (uses only stdlib)
|
||||
|
||||
**What it does:**
|
||||
- Same functionality as the shell script
|
||||
- Installs Python 3 via apt if missing
|
||||
- Uses subprocess to run git commands
|
||||
|
||||
---
|
||||
|
||||
## `setup_cron_clean.sh`
|
||||
|
||||
Installs automatic system updates as a system cron job.
|
||||
|
||||
**Location:** Repository root
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./setup_cron_clean.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. Installs cron package
|
||||
2. Copies `updates_clean.sh` to `/usr/local/sbin/`
|
||||
3. Creates `/etc/cron.d/auto_updates`
|
||||
4. Schedules updates every 6 hours
|
||||
|
||||
**Cron Schedule:**
|
||||
| Task | Schedule | Command |
|
||||
|------|----------|---------|
|
||||
| System updates | `0 */6 * * *` | `/usr/local/sbin/updates_clean.sh` |
|
||||
| Mount verification | `5 */1 * * *` | `mount -a` |
|
||||
|
||||
**Log file:** `/var/log/auto_updates.log`
|
||||
|
||||
**MAILTO:** Commented out by default. Uncomment and set your email if you want update notifications.
|
||||
|
||||
---
|
||||
|
||||
## `updates_clean.sh`
|
||||
|
||||
The actual update script called by cron.
|
||||
|
||||
**Location:** Repository root (also copy at `/usr/local/sbin/updates_clean.sh`)
|
||||
|
||||
**Run manually:**
|
||||
```bash
|
||||
sudo ./updates_clean.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. `apt update` — Refresh package lists
|
||||
2. `apt full-upgrade -y` — Apply all updates
|
||||
3. `apt autoremove -y` — Remove orphaned packages
|
||||
4. `apt autopurge -y` — Purge config of removed packages (Debian 11+)
|
||||
5. `apt clean -y` — Clear local cache
|
||||
|
||||
**Logging:** All output goes to stdout and `/var/log/auto_updates.log`
|
||||
|
||||
---
|
||||
|
||||
## `collect_info.sh`
|
||||
|
||||
System information collection script.
|
||||
|
||||
**Location:** Repository root
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
./collect_info.sh
|
||||
```
|
||||
|
||||
**Output:** Creates `info.txt` with system details including:
|
||||
- OS distribution and version
|
||||
- Hostname and kernel
|
||||
- CPU, memory, storage
|
||||
- GPU and PCI/USB devices
|
||||
- Network interfaces and routes
|
||||
- Display configuration
|
||||
|
||||
---
|
||||
|
||||
## `gather-logs/gather_logs.sh`
|
||||
|
||||
Collects system logs for troubleshooting.
|
||||
|
||||
**Location:** `gather-logs/`
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
./gather-logs.sh
|
||||
```
|
||||
|
||||
**Generates:** `/tmp/{date}-{hostname}.zip` containing:
|
||||
- `/var/log/` — syslog, auth, kern, daemon, dmesg, dpkg, apt
|
||||
- `journalctl` — current boot and all logs
|
||||
- System info — hostname, uname, df, free, ip addr, systemctl failed
|
||||
|
||||
---
|
||||
|
||||
## Comparison: Shell vs Python Update Scripts
|
||||
|
||||
| Feature | `update-from_repo.sh` | `update-from_repo.py` |
|
||||
|---------|----------------------|----------------------|
|
||||
| Language | Bash | Python |
|
||||
| Git install | apt/opkg | apt only |
|
||||
| Path typo | N/A | `pubic-setupfiles` (bug) |
|
||||
| Permissions | 755 recursive | 777 recursive |
|
||||
| Error handling | Basic | Try/except |
|
||||
|
||||
**Note:** The Python script has a typo in the clone path (`pubic-setupfiles` instead of `public-setupfiles`). Prefer the shell script for now.
|
||||
@@ -0,0 +1,170 @@
|
||||
# Docker Setup
|
||||
|
||||
Docker configuration, installation scripts, and backup utilities.
|
||||
|
||||
---
|
||||
|
||||
## Docker Installation Scripts
|
||||
|
||||
### `docker/install_docker_debian.sh`
|
||||
|
||||
Debian-based Docker Engine installation.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./install_docker_debian.sh
|
||||
```
|
||||
|
||||
**Includes:**
|
||||
- Docker Engine (docker-ce)
|
||||
- Docker Compose plugin (v2)
|
||||
- Optional: Adds current user to docker group
|
||||
|
||||
**Post-install:**
|
||||
```bash
|
||||
# Log out and back in, or run:
|
||||
newgrp docker
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `docker/install_docker_ubuntu.sh`
|
||||
|
||||
Ubuntu-specific Docker installation.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./install_docker_ubuntu.sh
|
||||
```
|
||||
|
||||
**Same functionality as debian script with Ubuntu package names.**
|
||||
|
||||
---
|
||||
|
||||
## Docker Compose Examples
|
||||
|
||||
### `docker/jellyfin-docker-compose.yml`
|
||||
|
||||
Media server configuration.
|
||||
|
||||
**Key settings:**
|
||||
- Ports: 8096 (web), 8920 (HTTPS), 7359/1900 (UPnP)
|
||||
- Volumes: config, cache, media
|
||||
- Published URL: `http://docker2`
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
**Edit before running:**
|
||||
- Update `volumes` paths to match your system
|
||||
- Adjust `JELLYFIN_PublishedServerUrl` for your domain
|
||||
|
||||
---
|
||||
|
||||
### `docker/portainer/portainers-installscript.sh`
|
||||
|
||||
Portainer container installation.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./portainers-installscript.sh
|
||||
```
|
||||
|
||||
**Creates:**
|
||||
- Portainer data volume
|
||||
- Portainer CE container on port 8099 (UI), 9443 (HTTPS)
|
||||
|
||||
---
|
||||
|
||||
### `docker/portainer/update-portainer.sh`
|
||||
|
||||
Update Portainer to latest version.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./update-portainer.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. Pulls `portainer/portainer-ce:latest`
|
||||
2. Restarts the container
|
||||
|
||||
---
|
||||
|
||||
## Docker Backup
|
||||
|
||||
### Location: `Docker_backup/`
|
||||
|
||||
**Scripts:**
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `docker-backup.sh` | Main backup script |
|
||||
| `setup_docker-backup.sh` | Install backup + cron |
|
||||
| `correct_docker-backup.sh` | Fix older installs |
|
||||
| `update_docker-backup.sh` | Upgrade existing |
|
||||
|
||||
**Backup Contents:**
|
||||
```
|
||||
/mnt/naspublic/docker-backup/{hostname}/{month}/{date}/
|
||||
├── /root/docker
|
||||
├── /opt/docker
|
||||
├── /var/lib/docker/volumes
|
||||
└── /home/traver/docker
|
||||
```
|
||||
|
||||
**Schedule:** Every 3 hours
|
||||
|
||||
**Retention:** 14 days
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
# First time setup
|
||||
sudo ./setup_docker-backup.sh
|
||||
|
||||
# Update existing install
|
||||
sudo ./update_docker-backup.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Docker Remote API
|
||||
|
||||
### `docker_stuff/setup-docker-remote-api.sh`
|
||||
|
||||
Enable Docker TCP API for remote monitoring (e.g., Uptime Kuma).
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
# Basic (insecure - listens on all interfaces)
|
||||
sudo bash setup-docker-remote-api.sh
|
||||
|
||||
# With IP restriction (secure)
|
||||
sudo bash setup-docker-remote-api.sh --allow-ip 10.0.84.50
|
||||
```
|
||||
|
||||
**Warning:** This exposes the Docker API over unencrypted TCP. Only use on trusted networks with IP restrictions.
|
||||
|
||||
**Default port:** 2375
|
||||
|
||||
---
|
||||
|
||||
## Docker Cleanup
|
||||
|
||||
### `docker_stuff/docker_cleanup_updates.sh`
|
||||
|
||||
Combined update and cleanup script.
|
||||
|
||||
**What it does:**
|
||||
1. Pulls setup scripts from GitHub
|
||||
2. Runs system updates
|
||||
3. Prunes unused Docker images
|
||||
4. Prunes unused Docker networks
|
||||
5. Removes stopped containers
|
||||
6. Clears build cache
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./docker_cleanup_updates.sh
|
||||
```
|
||||
@@ -0,0 +1,166 @@
|
||||
# Domain Lists
|
||||
|
||||
Domain blocklists, allowlists, and filtering rules used across the homelab.
|
||||
|
||||
---
|
||||
|
||||
## Domain List Overview
|
||||
|
||||
| Directory | Purpose |
|
||||
|-----------|---------|
|
||||
| `domains/` | General domain lists |
|
||||
| `pihole/` | Pi-hole DNS blocklists |
|
||||
| `unblocked_domains_for_VPN/` | VPN bypass domains |
|
||||
| `Email_domains_block_allow/` | Email server policies |
|
||||
|
||||
---
|
||||
|
||||
## Pi-hole Lists
|
||||
|
||||
### Location: `pihole/`
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `blocklist.txt` | 80,000+ ad/malware/social media domains |
|
||||
| `whitelist.txt` | Streaming services (Netflix, Hulu, etc.) |
|
||||
| `combined_list.txt` | Merged block + allow lists |
|
||||
|
||||
### Adding to Pi-hole
|
||||
|
||||
```bash
|
||||
# In Pi-hole web UI
|
||||
Group Management → Adlists → Add
|
||||
|
||||
# Use raw URLs:
|
||||
https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/pihole/blocklist.txt
|
||||
```
|
||||
|
||||
### Blocked Categories
|
||||
|
||||
- **Advertising:** Google Ads, DoubleClick, Taboola, Outbrain
|
||||
- **Social Media:** Facebook, Instagram, Twitter, TikTok, LinkedIn
|
||||
- **Adult Content:** Pornhub, XVideos, RedTube, YouPorn
|
||||
- **Malware:** Known malicious domains
|
||||
- **Gambling:** Betting and casino sites
|
||||
- **Gaming:** Roblox, Discord, gaming trackers
|
||||
|
||||
---
|
||||
|
||||
## Unblocked VPN Domains
|
||||
|
||||
### Location: `unblocked_domains_for_VPN/`
|
||||
|
||||
**Purpose:** Domains that should bypass the VPN connection.
|
||||
|
||||
**File:** `unblocked_domains.txt`
|
||||
|
||||
**Includes:**
|
||||
- Personal domains: `wickedyoda.com`, `tyates.one`, `twy4.us`
|
||||
- Work domains: `traverates.com`, `sampyates.com`, `designsbymantha.com`
|
||||
- Service domains: Tailscale, Home Assistant, etc.
|
||||
|
||||
---
|
||||
|
||||
## General Domain Lists
|
||||
|
||||
### Location: `domains/`
|
||||
|
||||
#### Social Media
|
||||
|
||||
**File:** `domains/social_media.txt`
|
||||
|
||||
Major platforms tracked:
|
||||
- Facebook/Meta family
|
||||
- Instagram
|
||||
- Twitter/X
|
||||
- TikTok
|
||||
- LinkedIn
|
||||
- Snapchat
|
||||
- Threads
|
||||
- Bluesky
|
||||
|
||||
---
|
||||
|
||||
#### Streaming Services
|
||||
|
||||
**File:** `domains/streaming_domains_whitelist.txt`
|
||||
|
||||
**Included:**
|
||||
- Netflix (and CDN)
|
||||
- Hulu
|
||||
- HBO Max
|
||||
- Disney+
|
||||
- Paramount+
|
||||
- Peacock
|
||||
- Amazon Prime Video
|
||||
|
||||
---
|
||||
|
||||
#### Adult Content
|
||||
|
||||
**File:** `domains/known_porn_domains.txt`
|
||||
|
||||
Large blocklist of adult content domains.
|
||||
|
||||
---
|
||||
|
||||
#### Country Domains
|
||||
|
||||
**File:** `domains/sweden_domains.txt`
|
||||
|
||||
Domains associated with Sweden (for geo-filtering).
|
||||
|
||||
---
|
||||
|
||||
## Email Domain Filtering
|
||||
|
||||
### Location: `Email_domains_block_allow/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `blocked_domains.md` | Domains to reject in SMTP |
|
||||
| `email_domain_allow_block_list.md` | Comprehensive rules |
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Postfix:** `header_checks`, `sender_access`
|
||||
- **Exim:** `acl_smtp_dnsbl`
|
||||
- **Exchange:** Transport Rules
|
||||
|
||||
---
|
||||
|
||||
## Bambu Lab Domains
|
||||
|
||||
### Location: `domains/bamboo_domains.txt`
|
||||
|
||||
Domains for Bambu Lab 3D printers:
|
||||
|
||||
```
|
||||
bambulab.com
|
||||
api.bambulab.com
|
||||
public-cdn.bambulab.cn
|
||||
cloud.bambulab.com
|
||||
ota.bambulab.com
|
||||
mqtt.bambulab.com
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Usage with Other Tools
|
||||
|
||||
### Pi-hole Adlist Format
|
||||
|
||||
```
|
||||
https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/pihole/blocklist.txt
|
||||
```
|
||||
|
||||
### Hosts File Format
|
||||
|
||||
```
|
||||
127.0.0.1 domain.com
|
||||
::1 domain.com
|
||||
```
|
||||
|
||||
### BIND/DNS Server
|
||||
|
||||
Import as zone files or use as external lookup sources.
|
||||
@@ -0,0 +1,91 @@
|
||||
# Getting Started
|
||||
|
||||
This guide helps you get started with the **public-setupfiles** repository.
|
||||
|
||||
## 📥 Cloning
|
||||
|
||||
### Quick Install (Recommended)
|
||||
|
||||
The fastest way to get started is using the provided update script:
|
||||
|
||||
```bash
|
||||
sudo curl -s https://raw.githubusercontent.com/wickedyoda/public-setupfiles/refs/heads/main/update-from_repo.sh | sudo bash
|
||||
```
|
||||
|
||||
This script:
|
||||
- Automatically installs Git if missing
|
||||
- Clones the repository to `./public-setupfiles`
|
||||
- Sets proper permissions
|
||||
|
||||
### Manual Clone
|
||||
|
||||
```bash
|
||||
git clone https://github.com/wickedyoda/public-setupfiles.git
|
||||
cd public-setupfiles
|
||||
chmod -R 755 .
|
||||
```
|
||||
|
||||
### Python Version (Alternative)
|
||||
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/wickedyoda/public-setupfiles/refs/heads/main/update-from_repo.py | python3
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Keeping Updated
|
||||
|
||||
### Automated Updates
|
||||
|
||||
Set up the automated update cron job:
|
||||
|
||||
```bash
|
||||
sudo ./setup_cron_clean.sh
|
||||
```
|
||||
|
||||
This installs `updates_clean.sh` to run every 6 hours.
|
||||
|
||||
### Manual Update
|
||||
|
||||
```bash
|
||||
# From the repo root
|
||||
./update-from_repo.sh
|
||||
|
||||
# Or using Python
|
||||
python3 update-from_repo.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📁 Navigation
|
||||
|
||||
| Directory | Purpose | Key Scripts |
|
||||
|-----------|---------|-------------|
|
||||
| `docker/` | Docker installations | `install_docker_debian.sh` |
|
||||
| `server_config/` | Server setup templates | `debian-setup.sh` |
|
||||
| `uptime-updates/` | Monitoring automation | `uptime-bot.py` |
|
||||
| `snmp/` | Network monitoring | `setup_snmp.sh` |
|
||||
| `pihole/` | DNS blocking | `blocklist.txt` |
|
||||
| `domains/` | Domain lists | `blocked_domains.md` |
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Safety Notes
|
||||
|
||||
- Always review scripts before running them
|
||||
- Some scripts require `sudo` or root access
|
||||
- Test in a non-production environment first
|
||||
- Backup critical data before making changes
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Tools Used
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| **ShellCheck** | Shell script linting |
|
||||
| **CodeQL** | Static code analysis |
|
||||
| **pip-audit** | Dependency vulnerability scan |
|
||||
| **Docker Scout** | Container image security |
|
||||
|
||||
See [Security Scanning](Security-Scanning.md) for details.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Public Setup Files — Repository Wiki
|
||||
|
||||
Welcome to the **public-setupfiles** wiki! This repository contains a collection of scripts and configuration snippets used across various systems in the WickedYoda homelab.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Wiki Index
|
||||
|
||||
| Category | Description |
|
||||
|---------|-------------|
|
||||
| [Getting Started](Getting-Started.md) | Quick start guide for cloning and using the repository |
|
||||
| [Core Scripts](Core-Scripts.md) | Overview of `update-from-repo` and `setup_cron_clean.sh` |
|
||||
| [Docker Setup](Docker-Setup.md) | Docker installation and backup utilities |
|
||||
| [System Updates](System-Updates.md) | Automated update and cleanup workflows |
|
||||
| [Linux Setup](Linux-Setup.md) | Debian and Ubuntu system configuration scripts |
|
||||
| [Monitoring](Monitoring.md) | Uptime Kuma bot, SNMP, Telegraf, Observium |
|
||||
| [Network](Network.md) | WireGuard VPN, Pi-hole, domains blocklists |
|
||||
| [NAS & Storage](NAS-Storage.md) | fstab setup, backup scripts |
|
||||
| [Windows Batch Files](Windows-Batch-Files.md) | Windows automation scripts |
|
||||
| [macOS Scripts](macOS-Scripts.md) | Homebrew and system update utilities |
|
||||
| [Raspberry Pi](Raspberry-Pi.md) | Raspberry Pi specific setup scripts |
|
||||
| [OpenWrt](OpenWrt.md) | Router configuration utilities |
|
||||
| [Kali & Security](Kali-Security.md) | Kali Linux and security tool installation |
|
||||
| [Domain Lists](Domain-Lists.md) | Email, VPN, and content domain lists |
|
||||
| [Troubleshooting](Troubleshooting.md) | Common issues and solutions |
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Cloning the Repository
|
||||
|
||||
```bash
|
||||
# Clone and set up in one command
|
||||
sudo curl -s https://raw.githubusercontent.com/wickedyoda/public-setupfiles/refs/heads/main/update-from_repo.sh | sudo bash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📁 Repository Structure
|
||||
|
||||
```
|
||||
public-setupfiles/
|
||||
├── .github/ # GitHub workflows and security config
|
||||
│ ├── workflows/
|
||||
│ └── SECURITY_SCANS.md
|
||||
├── Docker_backup/ # Docker data backup scripts
|
||||
├── Email_domains_block_allow/ # Email filtering domain lists
|
||||
├── Kali_tools_install/ # Kali Linux security tools
|
||||
├── WG VPN setup/ # WireGuard client setup
|
||||
├── batch_files/ # Windows batch automation
|
||||
├── cockpit/ # Cockpit web admin installer
|
||||
├── copy-move-files/ # Media file transfer scripts
|
||||
├── copy_palworld_local/ # Palworld server backup
|
||||
├── cron-job-setup-files/ # Cron job configuration
|
||||
├── debian-dist-upgrades/ # Debian version upgrade scripts
|
||||
├── debian-files/ # Debian utility scripts
|
||||
├── docker/ # Docker compose setups
|
||||
├── docker_stuff/ # Docker cleanup scripts
|
||||
├── domains/ # Domain block/allow lists
|
||||
├── fstab-setup/ # NFS/CIFS mount configuration
|
||||
├── gather-logs/ # System diagnostic script
|
||||
├── git_clone_setup/ # Git repository helpers
|
||||
├── kali-purple/ # Kali Purple installation
|
||||
├── mac-scripts/ # macOS automation
|
||||
├── observium/ # Observium monitoring agent
|
||||
├── openwrt_scripts/ # OpenWrt router utilities
|
||||
├── paperless-ngx/ # Document management setup
|
||||
├── pihole/ # Pi-hole blocklists
|
||||
├── raspberrypi/ # Raspberry Pi setup scripts
|
||||
├── redirecting-desktop_and_documents/ # Windows folder redirection
|
||||
├── reset_perms/ # Permission reset utilities
|
||||
├── server_config/ # Debian/Ubuntu server templates
|
||||
├── snmp/ # SNMP configuration scripts
|
||||
├── system_command_run/ # Distributed command execution
|
||||
├── telegraf-setup-scripts/ # Telegraf metrics agent
|
||||
├── ubuntu-based/ # Ubuntu application installer
|
||||
├── unblocked_domains_for_VPN/ # VPN domain whitelist
|
||||
├── updates_scripts/ # System update automation
|
||||
└── uptime-updates/ # Uptime Kuma container sync bot
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ Security
|
||||
|
||||
- This repository undergoes automated security scanning on every pull request.
|
||||
- Review [SECURITY.md](SECURITY.md) for details on the scanning tools used.
|
||||
- **Never commit secrets, credentials, or private keys.**
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Submit a pull request
|
||||
|
||||
All PRs are automatically scanned for security issues.
|
||||
|
||||
---
|
||||
|
||||
## 📞 Contact
|
||||
|
||||
For issues or questions, open an issue on GitHub or contact the maintainer through the WickedYoda homelab community.
|
||||
@@ -0,0 +1,120 @@
|
||||
# Kali Linux & Security Tools
|
||||
|
||||
Kali Linux setup and security tool installation scripts.
|
||||
|
||||
---
|
||||
|
||||
## Kali Tools Installation
|
||||
|
||||
### Location: `Kali_tools_install/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `setup_debian_kali_tools.sh` | Install Kali tools on Debian |
|
||||
| `Kalitoolsinstall.sh` | Direct Kali tools install |
|
||||
|
||||
---
|
||||
|
||||
### `setup_debian_kali_tools.sh`
|
||||
|
||||
Install Kali security tools on a Debian system.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./Kali_tools_install/setup_debian_kali_tools.sh
|
||||
```
|
||||
|
||||
**Tool Categories:**
|
||||
|
||||
| Category | Tools |
|
||||
|----------|-------|
|
||||
| Identify | `kali-tools-identify` |
|
||||
| Protect | `kali-tools-protect` |
|
||||
| Detect | `kali-tools-detect` |
|
||||
| Respond | `kali-tools-respond` |
|
||||
| Recover | `kali-tools-recover` |
|
||||
|
||||
---
|
||||
|
||||
## Kali Purple
|
||||
|
||||
### Location: `kali-purple/`
|
||||
|
||||
Kali Linux Purple security platform setup.
|
||||
|
||||
### Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `install_kali_purple.sh` | Install Kali Purple tools |
|
||||
|
||||
---
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
sudo ./kali-purple/install_kali_purple.sh
|
||||
```
|
||||
|
||||
**What it installs:**
|
||||
1. Kali Rolling sources
|
||||
2. System updates
|
||||
3. Kali Purple tools (`kali-tools-identify`, `kali-tools-protect`, etc.)
|
||||
4. Purple theme (`kali-themes-purple`)
|
||||
5. Legacy wallpapers
|
||||
|
||||
**Interactive prompts:**
|
||||
- Kali tool categories (1-5 or 'all')
|
||||
- Purple theme options (1-4)
|
||||
|
||||
---
|
||||
|
||||
## Kali Linux Conversion
|
||||
|
||||
### `debian-dist-upgrades/dist-upgrade.sh`
|
||||
|
||||
Option 4 allows converting Debian to Kali Linux.
|
||||
|
||||
```bash
|
||||
# From the dist-upgrade script
|
||||
4) Convert Debian to Parrot Linux
|
||||
|
||||
# For Kali, modify or use:
|
||||
git clone https://gitlab.com/parrotsec/project/debian-conversion-script.git
|
||||
cd debian-conversion-script
|
||||
chmod +x ./install.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Security Tool References
|
||||
|
||||
### Common Tools
|
||||
|
||||
| Category | Tools |
|
||||
|----------|-------|
|
||||
| Network Scanning | nmap, masscan |
|
||||
| Web Apps | nikto, sqlmap, wfuzz |
|
||||
| Wireless | aircrack-ng, reaver |
|
||||
| Forensics | autopsy, volatility |
|
||||
| Exploitation | metasploit, exploitdb |
|
||||
| Password | john, hashcat, hydra |
|
||||
|
||||
---
|
||||
|
||||
## Usage Recommendations
|
||||
|
||||
### Virtual Environment
|
||||
|
||||
```bash
|
||||
# Never run on production systems without testing
|
||||
# Use VirtualBox or VMware for isolated testing
|
||||
```
|
||||
|
||||
### Legal Compliance
|
||||
|
||||
```bash
|
||||
# Only scan networks you own or have permission to test
|
||||
# This software is for authorized security testing only
|
||||
```
|
||||
@@ -0,0 +1,184 @@
|
||||
# Linux Setup
|
||||
|
||||
Debian and Ubuntu system configuration scripts.
|
||||
|
||||
---
|
||||
|
||||
## Debian Files
|
||||
|
||||
### `debian-files/`
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `install-bashtop.sh` | Install system monitoring tool |
|
||||
| `update_tailscale.sh` | Update Tailscale with keyring |
|
||||
|
||||
#### Bashtop Installation
|
||||
|
||||
```bash
|
||||
sudo ./debian-files/install-bashtop.sh
|
||||
```
|
||||
|
||||
Installs from GitHub source (latest development version).
|
||||
|
||||
#### Tailscale Update
|
||||
|
||||
```bash
|
||||
sudo ./debian-files/update_tailscale.sh
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Detects Debian/Ubuntu/Raspbian
|
||||
- Normalizes codenames (bullseye, bookworm, etc.)
|
||||
- Falls back to legacy `apt-key` for older releases
|
||||
- Installs from official Tailscale repo
|
||||
|
||||
---
|
||||
|
||||
## Debian Distro Upgrades
|
||||
|
||||
### `debian-dist-upgrades/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `README.md` | This documentation |
|
||||
| `dist-upgrade.sh` | Interactive upgrade script |
|
||||
|
||||
#### `dist-upgrade.sh`
|
||||
|
||||
```bash
|
||||
sudo ./debian-dist-upgrades/dist-upgrade.sh
|
||||
```
|
||||
|
||||
**Supported upgrades:**
|
||||
- Debian 11 → 12 (stable)
|
||||
- Debian 12 → 13 (testing)
|
||||
|
||||
**Options:**
|
||||
```
|
||||
1) apt upgrade (security + bug fixes)
|
||||
2) apt full-upgrade (recommended)
|
||||
3) Debian distro upgrade (major version)
|
||||
4) Convert to Parrot Linux (security-focused)
|
||||
```
|
||||
|
||||
**Safety features:**
|
||||
- Backup of `/etc/apt/sources.list`
|
||||
- Double confirmation for Parrot conversion
|
||||
- Automatic dependency handling
|
||||
|
||||
---
|
||||
|
||||
## Server Configuration
|
||||
|
||||
### `server_config/`
|
||||
|
||||
#### `server_config/debian/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `debian-setup.sh` | Initial Debian server setup |
|
||||
|
||||
**Commands included:**
|
||||
```bash
|
||||
# Install basic tools
|
||||
apt install -y wireshark nmap openvpn etherape remmina monitorix
|
||||
|
||||
# Install networking
|
||||
apt install -y openssh-server smbclient cifs-utils
|
||||
|
||||
# Install utilities
|
||||
apt install -y curl unattended-upgrades cron-apt git
|
||||
```
|
||||
|
||||
#### `server_config/ubuntu/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `ubuntu-setup.sh` | Ubuntu server initial setup |
|
||||
| `ubuntu-docker-install.sh` | Docker on Ubuntu |
|
||||
|
||||
---
|
||||
|
||||
## fstab Setup
|
||||
|
||||
### `fstab-setup/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `Fstab entries.txt` | NAS mount configuration examples |
|
||||
| `setup-fstab.sh` | Generate and apply fstab entries |
|
||||
| `setup-fstab-remake-mnt.sh` | Reset and remount |
|
||||
|
||||
#### NAS Mount Entries
|
||||
|
||||
```bash
|
||||
# Public share
|
||||
//nas/public /media/naspublic cifs vers=2.0,username=admin,password=YOURPASS,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
|
||||
|
||||
# Media share
|
||||
//nas/DownloadedMedia /media/nasmedia cifs vers=2.0,username=admin,password=YOURPASS,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
|
||||
```
|
||||
|
||||
#### Setup Script
|
||||
|
||||
```bash
|
||||
sudo ./fstab-setup/setup-fstab.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. Backs up existing `/etc/fstab`
|
||||
2. Creates mount points
|
||||
3. Appends new entries
|
||||
4. Runs `mount -a` to activate
|
||||
|
||||
---
|
||||
|
||||
## Reset Permissions
|
||||
|
||||
### `reset_perms/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `reset_perms.sh` | Reset permissions on mount points |
|
||||
| `reset_perms 1.sh` | Alternative version |
|
||||
|
||||
#### Usage
|
||||
|
||||
```bash
|
||||
sudo ./reset_perms/reset_perms.sh
|
||||
```
|
||||
|
||||
**Resets:**
|
||||
```bash
|
||||
/mnt/public /dev/sdc1
|
||||
/mnt/public-bk /dev/sde1
|
||||
/mnt/public2 /dev/sdd1
|
||||
/mnt/public2-bk /dev/sdb1
|
||||
/mnt/timeshift bind mount from public2
|
||||
/mnt/timeshift1 bind mount from public2-bk
|
||||
```
|
||||
|
||||
**Sets:**
|
||||
- Ownership: `root:root`
|
||||
- Permissions: `777` (world read/write/execute)
|
||||
|
||||
---
|
||||
|
||||
## Gather Logs
|
||||
|
||||
### `gather-logs/`
|
||||
|
||||
**Script:** `gather_logs.sh`
|
||||
|
||||
```bash
|
||||
./gather-logs/gather_logs.sh
|
||||
```
|
||||
|
||||
**Collects:**
|
||||
- `/var/log/syslog`, `/var/log/auth.log`, `/var/log/kern.log`
|
||||
- `journalctl` output (current boot + all)
|
||||
- System info: hostname, uname, df, free, ip addr
|
||||
- Failed systemd units
|
||||
|
||||
**Output:** `/tmp/{date}-{hostname}.zip`
|
||||
@@ -0,0 +1,214 @@
|
||||
# Monitoring
|
||||
|
||||
Uptime Kuma automation, SNMP, Telegraf, and Observium monitoring tools.
|
||||
|
||||
---
|
||||
|
||||
## Uptime Updates Bot
|
||||
|
||||
### Location: `uptime-updates/`
|
||||
|
||||
A Python bot that syncs Docker container IDs with Uptime Kuma monitors when containers are recreated.
|
||||
|
||||
### Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `uptime-bot.py` | Main bot script |
|
||||
| `config.yml` | Uptime Kuma API config |
|
||||
| `container-monitor-map.yaml` | Container-to-monitor mappings |
|
||||
| `requirements.txt` | Python dependencies |
|
||||
| `setup-update_uptime-bot.sh` | Install script |
|
||||
| `export-watchtower-bundle.sh` | Export Docker bundles |
|
||||
|
||||
### Configuration
|
||||
|
||||
#### `config.yml`
|
||||
|
||||
```yaml
|
||||
uptime_kuma:
|
||||
url: "http://127.0.0.1:3001"
|
||||
api_key: "PUT_YOUR_API_KEY_HERE"
|
||||
|
||||
bot:
|
||||
dry_run: false
|
||||
request_timeout_seconds: 10
|
||||
poll_interval_seconds: 60
|
||||
```
|
||||
|
||||
#### `container-monitor-map.yaml`
|
||||
|
||||
```yaml
|
||||
mappings:
|
||||
- name: "media-server jellyfin"
|
||||
host_api: "tcp://10.0.84.21:2375"
|
||||
container_name: "jellyfin"
|
||||
uptime_monitor_id: 21
|
||||
expected_uptime_type: "docker"
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
sudo bash setup-update_uptime-bot.sh
|
||||
```
|
||||
|
||||
**Options:**
|
||||
```bash
|
||||
sudo bash setup-update_uptime-bot.sh --help
|
||||
|
||||
Options:
|
||||
--install-dir PATH Install directory (default: /opt/uptime-updates)
|
||||
--service-name NAME systemd unit name
|
||||
--user USER User to run as
|
||||
--group GROUP Group to run as
|
||||
--no-enable Skip enabling on boot
|
||||
--no-start Skip starting after install
|
||||
--overwrite-config Replace existing config
|
||||
--overwrite-map Replace existing map
|
||||
--dry-run Print actions without executing
|
||||
```
|
||||
|
||||
### Standalone Docker Deployment
|
||||
|
||||
#### `watchtower-export/`
|
||||
|
||||
Includes Docker Compose files for running without systemd:
|
||||
|
||||
- `docker-compose.watchtower-uptime-sync.yml` — Separate containers
|
||||
- `docker-compose.watchtower-embedded.yml` — Embedded in watchtower
|
||||
|
||||
**Run:**
|
||||
```bash
|
||||
docker compose -f docker-compose.watchtower-uptime-sync.yml up -d
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SNMP Configuration
|
||||
|
||||
### Location: `snmp/`
|
||||
|
||||
SNMP setup scripts for various platforms.
|
||||
|
||||
#### Linux
|
||||
|
||||
**Files:**
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `setup_snmp.sh` | Standard Linux SNMPv3 setup |
|
||||
| `setup_snmp_openwrt.sh` | OpenWrt SNMPv3 |
|
||||
| `setup_snmp_openwrt_v2.sh` | OpenWrt SNMPv3 (alternative) |
|
||||
| `setup_snmp_openwrt_publicv2.sh` | OpenWrt SNMPv2 (public) |
|
||||
|
||||
**Usage (Linux):**
|
||||
```bash
|
||||
sudo ./snmp/setup_snmp.sh
|
||||
```
|
||||
|
||||
**Prompts:**
|
||||
- SNMPv3 username and password
|
||||
- System location
|
||||
- System contact
|
||||
|
||||
**Features:**
|
||||
- Creates `createUser` entry
|
||||
- Sets up `rouser` with authPriv
|
||||
- Configures firewall rules
|
||||
|
||||
#### macOS
|
||||
|
||||
**File:** `snmp/Setup_snmp_macos.sh`
|
||||
|
||||
```bash
|
||||
brew install net-snmp
|
||||
sudo ./snmp/Setup_snmp_macos.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Telegraf Setup
|
||||
|
||||
### Location: `telegraf-setup-scripts/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `install-client.sh` | Install Telegraf client |
|
||||
| `update-telegraf-w-keys.sh` | Update with SSH keys |
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/telegraf-setup-scripts/install-client.sh | sudo bash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Observium Agent
|
||||
|
||||
### Location: `observium/`
|
||||
|
||||
Open-source network monitoring platform agent installer.
|
||||
|
||||
**Setup:**
|
||||
```bash
|
||||
sudo wget https://raw.githubusercontent.com/tkrause/Observium-Agent/master/agent.conf.sh
|
||||
sudo wget https://raw.githubusercontent.com/tkrause/Observium-Agent/master/observium-agent-install.sh
|
||||
sudo chmod +x agent.conf.sh observium-agent-install.sh
|
||||
sudo ./observium-agent-install.sh
|
||||
```
|
||||
|
||||
**Agent Config Options:**
|
||||
```
|
||||
$SYSCONTACT # Email: "Name <email@example.com>"
|
||||
$SYSLOCATION # Physical location
|
||||
$SNMP_COMMUNITY # SNMP community string
|
||||
$OBSERVIUM_HOST # Observium server IP
|
||||
$MODULES # Optional: space-separated modules
|
||||
$SVN_USER # Enterprise license username
|
||||
$SVN_PASS # Enterprise license password
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Pi-hole
|
||||
|
||||
### Location: `pihole/`
|
||||
|
||||
Blocklists for Pi-hole DNS sinkhole.
|
||||
|
||||
| File | Type |
|
||||
|------|------|
|
||||
| `blocklist.txt` | Domains to block (adult, porn, gambling, etc.) |
|
||||
| `whitelist.txt` | Netflix streaming domains |
|
||||
| `combined_list.txt` | Merged block + allow lists |
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
# In Pi-hole web UI
|
||||
# Group Management → Adlists
|
||||
# Add: https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/pihole/blocklist.txt
|
||||
```
|
||||
|
||||
**Estimated domains blocked:**
|
||||
- 80,000+ ad/malware domains
|
||||
- 100+ social media domains
|
||||
- 100+ streaming domains (whitelist)
|
||||
|
||||
---
|
||||
|
||||
## Domain Lists
|
||||
|
||||
### Location: `domains/`
|
||||
|
||||
| Directory | Description |
|
||||
|-----------|-------------|
|
||||
| `Email_domains_block_allow/` | Email server domain policies |
|
||||
| `unblocked_domains_for_VPN/` | Domains allowed through VPN |
|
||||
|
||||
**Email Domain Files:**
|
||||
- `blocked_domains.md` — Domains to block for email
|
||||
- `email_domain_allow_block_list.md` — Allow/block rules
|
||||
|
||||
**Unblocked Domains:**
|
||||
- Personal domains (wickedyoda.com, tyates.one)
|
||||
- Work domains (traveryates.com, sampyates.com, etc.)
|
||||
@@ -0,0 +1,165 @@
|
||||
# NAS & Storage
|
||||
|
||||
Network Attached Storage setup, SMB/CIFS mounting, and backup scripts.
|
||||
|
||||
---
|
||||
|
||||
## SMB/NAS Mount Setup
|
||||
|
||||
### `fstab-setup/`
|
||||
|
||||
Configure NAS shares via `/etc/fstab`.
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `Fstab entries.txt` | Pre-built mount examples |
|
||||
| `setup-fstab.sh` | Apply fstab changes |
|
||||
| `setup-fstab-remake-mnt.sh` | Re-create mount points |
|
||||
|
||||
### Mount Entry Format
|
||||
|
||||
```
|
||||
//server/share /mount/point cifs options 0 0
|
||||
```
|
||||
|
||||
### Common Entries
|
||||
|
||||
```bash
|
||||
# Public share (read/write)
|
||||
//nas/public /mnt/naspublic cifs vers=2.0,username=admin,password=YOURPASS,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
|
||||
|
||||
# Download media
|
||||
//nas/DownloadedMedia /mnt/nasmedia cifs vers=2.0,username=admin,password=YOURPASS,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
|
||||
|
||||
# Public2 share
|
||||
//nas/public-share2 /mnt/naspublic-share2 cifs vers=2.0,username=admin,password=YOURPASS,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
|
||||
```
|
||||
|
||||
### Setup Script
|
||||
|
||||
```bash
|
||||
sudo ./fstab-setup/setup-fstab.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## NAS Share Management
|
||||
|
||||
### `copy-move-files/`
|
||||
|
||||
Scripts for copying and moving media between NAS and local storage.
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `media_to_usb.sh` | Copy NAS media to USB drive |
|
||||
| `public_to_usb.sh` | Transfer public share to USB |
|
||||
| `nas public.sh` | Sync from NAS to local |
|
||||
| `Brandons-Minecraft_backup.sh` | Minecraft world backup |
|
||||
|
||||
### Example Usage
|
||||
|
||||
```bash
|
||||
# Copy media to USB
|
||||
sudo ./copy-move-files/media_to_usb.sh
|
||||
|
||||
# Sync public share
|
||||
sudo ./copy-move-files/nas\ public.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Docker Backup
|
||||
|
||||
### Location: `Docker_backup/`
|
||||
|
||||
Complete Docker data backup solution.
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `docker-backup.sh` | Main backup script |
|
||||
| `setup_docker-backup.sh` | Install + schedule |
|
||||
| `correct_docker-backup.sh` | Fix older installs |
|
||||
| `update_docker-backup.sh` | Upgrade existing |
|
||||
|
||||
### Backup Contents
|
||||
|
||||
```
|
||||
/mnt/naspublic/docker-backup/{hostname}/{month}/{date}/
|
||||
├── /root/docker
|
||||
├── /opt/docker
|
||||
├── /var/lib/docker/volumes
|
||||
└── /home/traver/docker
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
sudo ./Docker_backup/setup_docker-backup.sh
|
||||
```
|
||||
|
||||
**Schedule:** Every 3 hours via cron
|
||||
|
||||
**Retention:** 14 days
|
||||
|
||||
---
|
||||
|
||||
## Raspberry Pi Storage
|
||||
|
||||
### Location: `raspberrypi/`
|
||||
|
||||
SD card and USB storage management.
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `raspberry_pi_fstab.sh` | Configure fstab for Pi |
|
||||
| `rasp_pi_install_apps.sh` | Install apps on Pi |
|
||||
| `Media_to_ap-share.sh` | Sync to AP share |
|
||||
| `public_to_usb.sh` | Transfer to USB |
|
||||
|
||||
---
|
||||
|
||||
## Permission Management
|
||||
|
||||
### `reset_perms/`
|
||||
|
||||
Reset file permissions on mount points.
|
||||
|
||||
```bash
|
||||
sudo ./reset_perms/reset_perms.sh
|
||||
```
|
||||
|
||||
**Resets permissions to:**
|
||||
- Owner: `root:root`
|
||||
- Permissions: `777` (full read/write/execute)
|
||||
|
||||
**Applies to:**
|
||||
```
|
||||
/mnt/public
|
||||
/mnt/public-bk
|
||||
/mnt/public2
|
||||
/mnt/public2-bk
|
||||
/mnt/timeshift
|
||||
/mnt/timeshift1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## System Information
|
||||
|
||||
### `collect_info.sh` (repo root)
|
||||
|
||||
Generate system information report.
|
||||
|
||||
```bash
|
||||
./collect_info.sh
|
||||
```
|
||||
|
||||
**Output:** `info.txt`
|
||||
|
||||
**Contains:**
|
||||
- OS and kernel version
|
||||
- CPU and memory
|
||||
- Storage layout
|
||||
- Network interfaces
|
||||
- GPU information
|
||||
- Display configuration
|
||||
@@ -0,0 +1,196 @@
|
||||
# Network
|
||||
|
||||
VPN, firewall, domain lists, and network automation scripts.
|
||||
|
||||
---
|
||||
|
||||
## WireGuard VPN
|
||||
|
||||
### Location: `WG VPN setup/`
|
||||
|
||||
WireGuard client tunnel setup for connecting to the Flint4 router.
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Download installer
|
||||
curl -sSL https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/WG%20VPN%20setup/install-wireguard-client.sh -o install-wireguard-client.sh
|
||||
chmod +x install-wireguard-client.sh
|
||||
|
||||
# Run
|
||||
sudo ./install-wireguard-client.sh
|
||||
```
|
||||
|
||||
### What the Script Does
|
||||
|
||||
1. **Installs WireGuard:** `wireguard` and `wireguard-tools` packages
|
||||
2. **Copies config:** Places it at `/etc/wireguard/wgclient2.conf`
|
||||
3. **Creates systemd service:** `wg-wgclient2.service`
|
||||
4. **Activates tunnel:** Brings up the interface
|
||||
|
||||
### Management Commands
|
||||
|
||||
```bash
|
||||
# Check tunnel status
|
||||
wg show wgclient2
|
||||
|
||||
# Restart tunnel
|
||||
sudo systemctl restart wg-wgclient2
|
||||
|
||||
# View logs
|
||||
sudo journalctl -u wg-wgclient2 -f
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Default settings:
|
||||
- **Tunnel name:** `wgclient2`
|
||||
- **Peer host:** `twy4us.duckdns.org` (Flint4 DuckDNS)
|
||||
- **Config location:** `/etc/wireguard/wgclient2.conf`
|
||||
|
||||
**To customize:** Edit `install-wireguard-client.sh` before running.
|
||||
|
||||
---
|
||||
|
||||
## OpenVPN
|
||||
|
||||
### `ubuntu-based/ubuntu_install_apps.sh`
|
||||
|
||||
Includes OpenVPN client installation:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install -y openvpn
|
||||
```
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo openvpn --config my-vpn.ovpn
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Pi-hole DNS
|
||||
|
||||
### Location: `pihole/`
|
||||
|
||||
DNS-based ad blocking and malware protection.
|
||||
|
||||
### Blocklists
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `blocklist.txt` | 80,000+ ad/malware/social media domains |
|
||||
| `whitelist.txt` | Netflix streaming domains |
|
||||
| `combined_list.txt` | Merged block + allow lists |
|
||||
|
||||
### Integration
|
||||
|
||||
**Add to Pi-hole:**
|
||||
```bash
|
||||
# Via web UI
|
||||
Group Management → Adlists → Add
|
||||
|
||||
# URL
|
||||
https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/pihole/blocklist.txt
|
||||
```
|
||||
|
||||
**Categories blocked:**
|
||||
- Ad networks (Google Ads, DoubleClick, etc.)
|
||||
- Social media trackers
|
||||
- Adult content
|
||||
- Gambling sites
|
||||
- Malware domains
|
||||
|
||||
---
|
||||
|
||||
## Domain Lists
|
||||
|
||||
### `unblocked_domains_for_VPN/`
|
||||
|
||||
Domains that should bypass VPN (allow direct connection).
|
||||
|
||||
**File:** `unblocked_domains.txt`
|
||||
|
||||
**Contents:**
|
||||
- Personal sites (wickedyoda.com, tyates.one)
|
||||
- Work/business domains
|
||||
- Local network domains
|
||||
|
||||
---
|
||||
|
||||
### `domains/`
|
||||
|
||||
Various domain lists for different purposes.
|
||||
|
||||
| File | Use Case |
|
||||
|------|----------|
|
||||
| `social_media.txt` | Social networking sites |
|
||||
| `streaming_domains_whitelist.txt` | Netflix, Hulu, HBO Max, etc. |
|
||||
| `known_porn_domains.txt` | Adult content |
|
||||
| `bamboo_domains.txt` | Bambu Lab printer domains |
|
||||
|
||||
---
|
||||
|
||||
## Email Domain Filtering
|
||||
|
||||
### `Email_domains_block_allow/`
|
||||
|
||||
Domain policies for email servers.
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `blocked_domains.md` | Domains to reject at SMTP level |
|
||||
| `email_domain_allow_block_list.md` | Comprehensive allow/block rules |
|
||||
|
||||
**Use with:**
|
||||
- Postfix
|
||||
- Exim
|
||||
- Microsoft Exchange
|
||||
- Any SMTP server supporting domain-based filtering
|
||||
|
||||
---
|
||||
|
||||
## Network Tools
|
||||
|
||||
### `docker_stuff/`
|
||||
|
||||
**File:** `docker_cleanup_updates.sh`
|
||||
|
||||
Combined Docker and system update script with network verification.
|
||||
|
||||
**Features:**
|
||||
- System package updates
|
||||
- Docker image/network pruning
|
||||
- Container cleanup
|
||||
- Build cache removal
|
||||
|
||||
### `docker/install_docker_debian.sh`
|
||||
|
||||
Docker installation with proper networking:
|
||||
```bash
|
||||
# After install, add user to docker group
|
||||
sudo usermod -aG docker $USER
|
||||
newgrp docker # Or log out/in
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## OpenWrt Router Scripts
|
||||
|
||||
### Location: `openwrt_scripts/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `openwrt_full-upgrade.sh` | Full OpenWrt firmware upgrade |
|
||||
| `installing_ipref.sh` | IP configuration scripts |
|
||||
| `openwrt_snmp_defaults.txt` | SNMP configuration templates |
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
# SSH to router
|
||||
ssh root@10.0.84.1
|
||||
|
||||
# Download and run
|
||||
curl -sSL https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/openwrt_scripts/openwrt_full-upgrade.sh | sh
|
||||
```
|
||||
@@ -0,0 +1,155 @@
|
||||
# OpenWrt Router Setup
|
||||
|
||||
OpenWrt router configuration and management scripts.
|
||||
|
||||
---
|
||||
|
||||
## Scripts
|
||||
|
||||
### Location: `openwrt_scripts/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `openwrt_full-upgrade.sh` | Full firmware upgrade |
|
||||
| `installing_ipref.sh` | IP configuration |
|
||||
| `openwrt_snmp_defaults.txt` | SNMP config template |
|
||||
|
||||
---
|
||||
|
||||
## Full System Upgrade
|
||||
|
||||
### `openwrt_full-upgrade.sh`
|
||||
|
||||
Perform a complete OpenWrt upgrade.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
ssh root@10.0.84.1
|
||||
curl -sSL https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/openwrt_scripts/openwrt_full-upgrade.sh | sh
|
||||
```
|
||||
|
||||
**Process:**
|
||||
1. Downloads latest firmware
|
||||
2. Validates checksum
|
||||
3. Backs up config
|
||||
4. Performs sysupgrade
|
||||
|
||||
---
|
||||
|
||||
## IP Configuration
|
||||
|
||||
### `installing_ipref.sh`
|
||||
|
||||
Configure IP addresses and interfaces.
|
||||
|
||||
**Typical usage:**
|
||||
```bash
|
||||
# Access router via SSH
|
||||
ssh root@192.168.1.1
|
||||
|
||||
# Run configuration script
|
||||
./installing_ipref.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SNMP on OpenWrt
|
||||
|
||||
### `openwrt_snmp_defaults.txt`
|
||||
|
||||
Default SNMP configuration for OpenWrt routers.
|
||||
|
||||
```bash
|
||||
# Edit /etc/config/snmpd
|
||||
config agent
|
||||
option agentaddress 'udp:161'
|
||||
|
||||
config view
|
||||
option name 'all'
|
||||
option type 'included'
|
||||
option oid '.1'
|
||||
|
||||
config group
|
||||
option groupname 'publicGroup'
|
||||
option securitymodel 'v2c'
|
||||
|
||||
config access
|
||||
option groupname 'publicGroup'
|
||||
option version 'v2c'
|
||||
option level 'noAuthNoPriv'
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Install SNMP
|
||||
opkg update
|
||||
opkg install snmpd snmp-utils
|
||||
|
||||
# Configure
|
||||
cat /etc/config/snmpd.d/openwrt-snmp_defaults.txt > /etc/config/snmpd
|
||||
|
||||
# Restart
|
||||
/etc/init.d/snmpd restart
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## OpenWrt Management Tips
|
||||
|
||||
### SSH Access
|
||||
|
||||
```bash
|
||||
# Default credentials
|
||||
root@openwrt
|
||||
|
||||
# Change password
|
||||
passwd
|
||||
```
|
||||
|
||||
### Package Management
|
||||
|
||||
```bash
|
||||
# Install packages
|
||||
opkg update
|
||||
opkg install <package>
|
||||
|
||||
# List packages
|
||||
opkg list-installed
|
||||
|
||||
# Remove packages
|
||||
opkg remove <package>
|
||||
```
|
||||
|
||||
### Configuration Backup
|
||||
|
||||
```bash
|
||||
# Backup config
|
||||
tar -czf /root/backup-$(date +%Y%m%d).tar.gz /etc/config/
|
||||
|
||||
# Restore
|
||||
tar -xzf backup-20240101.tar.gz -C /
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Network Configuration
|
||||
|
||||
### Wireguard Client
|
||||
|
||||
For WireGuard client setup, see [WireGuard VPN](../WG%20VPN%20setup/readme.md).
|
||||
|
||||
### Port Forwarding
|
||||
|
||||
```bash
|
||||
# Add port forward
|
||||
uci add firewall redirect
|
||||
uci set firewall.@redirect[-1].name='MyService'
|
||||
uci set firewall.@redirect[-1].src='wan'
|
||||
uci set firewall.@redirect[-1].src_dport='8080'
|
||||
uci set firewall.@redirect[-1].dest='lan'
|
||||
uci set firewall.@redirect[-1].dest_ip='192.168.1.100'
|
||||
uci set firewall.@redirect[-1].dest_port='80'
|
||||
uci commit firewall
|
||||
/etc/init.d/firewall restart
|
||||
```
|
||||
@@ -0,0 +1,121 @@
|
||||
# Raspberry Pi
|
||||
|
||||
Raspberry Pi setup scripts for media, backups, and system configuration.
|
||||
|
||||
---
|
||||
|
||||
## Scripts
|
||||
|
||||
### Location: `raspberrypi/`
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `rasp_pi_install_apps.sh` | Install applications |
|
||||
| `raspberry_pi_fstab.sh` | Configure mounts |
|
||||
| `Media_to_ap-share.sh` | Sync to AP share |
|
||||
| `public_to_usb.sh` | Transfer to USB |
|
||||
|
||||
---
|
||||
|
||||
## App Installation
|
||||
|
||||
### `rasp_pi_install_apps.sh`
|
||||
|
||||
Initial package installation for Raspberry Pi.
|
||||
|
||||
```bash
|
||||
# Network tools
|
||||
apt install wireshark nmap openvpn etherape remmina
|
||||
|
||||
# Storage
|
||||
apt install cifs-utils exfat-fuse
|
||||
|
||||
# System utilities
|
||||
apt install curl git python software-properties-common
|
||||
|
||||
# Optional: Media server
|
||||
curl -fsSL https://pi.vpetkov.net -o ventz-media-pi
|
||||
sh ventz-media-pi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## fstab Configuration
|
||||
|
||||
### `raspberry_pi_fstab.sh`
|
||||
|
||||
Configure network mounts on Raspberry Pi.
|
||||
|
||||
**Mounts configured:**
|
||||
```
|
||||
/media/naspublic //nas/public
|
||||
/media/nasdownloadedmedia //nas/DownloadedMedia
|
||||
/media/naspublic-share2 //nas/public-share2
|
||||
```
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./raspberrypi/raspberry_pi_fstab.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Media Sync
|
||||
|
||||
### `Media_to_ap-share.sh`
|
||||
|
||||
Sync media to Apple TV share.
|
||||
|
||||
```bash
|
||||
sudo mount -a
|
||||
rsync -r --progress --delete \
|
||||
/media/nasmedia/Movies/ \
|
||||
/media/traver/File_store/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `public_to_usb.sh`
|
||||
|
||||
Transfer public files to USB drive.
|
||||
|
||||
```bash
|
||||
sudo mount -a
|
||||
rsync -r --progress --delete \
|
||||
/media/naspublic/ \
|
||||
/media/pi/4tb/public
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Pi-Specific Considerations
|
||||
|
||||
### Memory
|
||||
|
||||
- Swap may need configuration for large updates
|
||||
- `dphys-swapconf` for swap file management
|
||||
|
||||
### Storage
|
||||
|
||||
- SD card wear: Use log2ram or tmpfs for `/var/log`
|
||||
- Backup regularly
|
||||
|
||||
### Network
|
||||
|
||||
- Ensure stable WiFi or Ethernet connection
|
||||
- Static IP recommended for NAS mounts
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# 1. Update system
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
|
||||
# 2. Install apps
|
||||
sudo ./raspberrypi/rasp_pi_install_apps.sh
|
||||
|
||||
# 3. Configure mounts
|
||||
sudo ./raspberrypi/raspberry_pi_fstab.sh
|
||||
```
|
||||
@@ -0,0 +1,177 @@
|
||||
# System Updates
|
||||
|
||||
Automated system update and cleanup utilities.
|
||||
|
||||
---
|
||||
|
||||
## Update Scripts
|
||||
|
||||
### `updates_scripts/` Directory
|
||||
|
||||
| Script | Description |
|
||||
|--------|-------------|
|
||||
| `updates.sh` | Standard update script |
|
||||
| `updates.py` | Python version |
|
||||
| `kali-updates.sh` | Kali Linux rolling update |
|
||||
| `dist-upgrade.sh` | Debian distro upgrade wrapper |
|
||||
| `docker-run-netdata-install.sh` | Install Netdata in Docker |
|
||||
| `fix_apt_influx.sh` | Repair InfluxDB repo issues |
|
||||
|
||||
---
|
||||
|
||||
## Standard Updates
|
||||
|
||||
### `updates_scripts/updates.sh`
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./updates.sh
|
||||
```
|
||||
|
||||
**Commands executed:**
|
||||
```bash
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt full-upgrade -y
|
||||
apt autoremove -y
|
||||
apt clean -y
|
||||
apt purge -y
|
||||
```
|
||||
|
||||
**Interactive:** Prompts before executing.
|
||||
|
||||
---
|
||||
|
||||
### `updates_scripts/updates.py`
|
||||
|
||||
Python implementation of the update script.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 updates.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Update Workflow
|
||||
|
||||
### `setup_cron_clean.sh` (repository root)
|
||||
|
||||
Sets up automatic updates via cron.
|
||||
|
||||
**Installation:**
|
||||
```bash
|
||||
sudo ./setup_cron_clean.sh
|
||||
```
|
||||
|
||||
**Result:**
|
||||
- Script installed to `/usr/local/sbin/updates_clean.sh`
|
||||
- Cron job created at `/etc/cron.d/auto_updates`
|
||||
- Updates run every 6 hours
|
||||
|
||||
**To modify schedule:**
|
||||
```bash
|
||||
sudo nano /etc/cron.d/auto_updates
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Kali Updates
|
||||
|
||||
### `updates_scripts/kali-updates.sh`
|
||||
|
||||
Interactive Kali Linux update with tool selection.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./kali-updates.sh
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Selectively installs Kali tool categories
|
||||
- Option to install Kali Purple theme
|
||||
- Clean output with progress indicators
|
||||
|
||||
**Tool Categories:**
|
||||
| # | Tools |
|
||||
|---|-------|
|
||||
| 1 | `kali-tools-identify` |
|
||||
| 2 | `kali-tools-protect` |
|
||||
| 3 | `kali-tools-detect` |
|
||||
| 4 | `kali-tools-respond` |
|
||||
| 5 | `kali-tools-recover` |
|
||||
|
||||
---
|
||||
|
||||
## Debian Distro Upgrade
|
||||
|
||||
### `debian-dist-upgrades/dist-upgrade.sh`
|
||||
|
||||
Safe, interactive Debian version upgrade utility.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./dist-upgrade.sh
|
||||
```
|
||||
|
||||
**Upgrade Options:**
|
||||
| Choice | Target |
|
||||
|--------|--------|
|
||||
| 1 | `apt upgrade` |
|
||||
| 2 | `apt full-upgrade` |
|
||||
| 3 | Debian distro upgrade |
|
||||
| 4 | Parallel Linux conversion |
|
||||
|
||||
**Supported:**
|
||||
- Debian 11 (Bullseye) → 12 (Bookworm)
|
||||
- Debian 12 (Bookworm) → 13 (Trixie - testing)
|
||||
|
||||
**Features:**
|
||||
- Backup of `/etc/apt/sources.list`
|
||||
- Confirmation prompts
|
||||
- Logging to stdout
|
||||
|
||||
---
|
||||
|
||||
## InfluxDB APT Fix
|
||||
|
||||
### `updates_scripts/fix_apt_influx.sh`
|
||||
|
||||
Repair InfluxDB repository issues on Debian Bookworm.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
sudo ./fix_apt_influx.sh
|
||||
```
|
||||
|
||||
**Fixes:**
|
||||
1. Downloads InfluxData GPG key from official source
|
||||
2. Verifies key fingerprint (SHA256: `C9F5E5D7E3A1B2C4D6E8F0A1B2C3D4E5F6A7B8C9`)
|
||||
3. Adds keyring using modern method (`signed-by`)
|
||||
4. Adds Sury PHP repository
|
||||
5. Cleans stale APT metadata
|
||||
6. Runs full upgrade
|
||||
|
||||
---
|
||||
|
||||
## Cleanup Scripts
|
||||
|
||||
### `updates_clean.sh` (root)
|
||||
|
||||
Hardened automatic update + cleanup script.
|
||||
|
||||
**Compared to `updates.sh`:**
|
||||
- Timestamped logging
|
||||
- Uses `full-upgrade` (not `upgrade`)
|
||||
- Runs `autopurge` on Debian 11+
|
||||
- Graceful error handling (continues on failure)
|
||||
|
||||
**Run manually:**
|
||||
```bash
|
||||
sudo ./updates_clean.sh
|
||||
```
|
||||
|
||||
**View logs:**
|
||||
```bash
|
||||
tail -f /var/log/auto_updates.log
|
||||
```
|
||||
@@ -0,0 +1,283 @@
|
||||
# Troubleshooting
|
||||
|
||||
Common issues and solutions for the public-setupfiles repository.
|
||||
|
||||
---
|
||||
|
||||
## Update Issues
|
||||
|
||||
### Script Fails with "Permission denied"
|
||||
|
||||
```bash
|
||||
# Make sure script is executable
|
||||
chmod +x update-from_repo.sh
|
||||
|
||||
# Or run with bash directly
|
||||
bash update-from_repo.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### "Repository not found" Error
|
||||
|
||||
Check internet connectivity and GitHub status:
|
||||
```bash
|
||||
ping github.com
|
||||
curl -I https://github.com/wickedyoda/public-setupfiles
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Path Typo in Python Script
|
||||
|
||||
The Python script has a typo: `pubic-setupfiles` instead of `public-setupfiles`.
|
||||
|
||||
**Fix:** Use the shell script or correct the path in `update-from_repo.py`.
|
||||
|
||||
---
|
||||
|
||||
## Docker Issues
|
||||
|
||||
### "Cannot connect to Docker daemon"
|
||||
|
||||
```bash
|
||||
# Check if Docker is running
|
||||
sudo systemctl status docker
|
||||
|
||||
# Start Docker
|
||||
sudo systemctl start docker
|
||||
```
|
||||
|
||||
### "Permission denied" for Docker Commands
|
||||
|
||||
```bash
|
||||
# Add user to docker group
|
||||
sudo usermod -aG docker $USER
|
||||
|
||||
# Log out and back in, or run:
|
||||
newgrp docker
|
||||
```
|
||||
|
||||
### "Image prune" Fails
|
||||
|
||||
```bash
|
||||
# Check disk space
|
||||
df -h
|
||||
|
||||
# Force prune if needed
|
||||
docker image prune -af --force
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## WireGuard Issues
|
||||
|
||||
### "no key exchange maps available"
|
||||
|
||||
```bash
|
||||
# Check WireGuard interface
|
||||
sudo wg show wgclient2
|
||||
|
||||
# Restart service
|
||||
sudo systemctl restart wg-wgclient2
|
||||
|
||||
# Check logs
|
||||
sudo journalctl -u wg-wgclient2 -n 50
|
||||
```
|
||||
|
||||
### Tunnel Won't Start
|
||||
|
||||
1. Verify config file permissions: `ls -la /etc/wireguard/`
|
||||
2. Check config syntax: `sudo wg-quick strip wgclient2`
|
||||
3. Verify peer is reachable: `ping <peer-ip>`
|
||||
|
||||
---
|
||||
|
||||
## Pi-hole Issues
|
||||
|
||||
### Domains Not Blocking
|
||||
|
||||
```bash
|
||||
# Check gravity update
|
||||
pihole -g
|
||||
|
||||
# Verify domain is in list
|
||||
pihole -q example.com
|
||||
```
|
||||
|
||||
### DNS Resolution Slow
|
||||
|
||||
```bash
|
||||
# Check upstream servers
|
||||
pihole -c
|
||||
|
||||
# Restart DNS
|
||||
sudo systemctl restart pihole-FTL
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Uptime Kuma Bot Issues
|
||||
|
||||
### Bot Not Updating Container IDs
|
||||
|
||||
1. Check Docker API access:
|
||||
```bash
|
||||
curl http://docker-host:2375/version
|
||||
```
|
||||
|
||||
2. Verify mapping file:
|
||||
```bash
|
||||
cat /opt/uptime-updates/container-monitor-map.yaml
|
||||
```
|
||||
|
||||
3. Check bot logs:
|
||||
```bash
|
||||
journalctl -u uptime-updates-bot -f
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SNMP Issues
|
||||
|
||||
### "Timeout: No Response from Server"
|
||||
|
||||
1. Verify SNMP daemon:
|
||||
```bash
|
||||
systemctl status snmpd
|
||||
```
|
||||
|
||||
2. Check firewall:
|
||||
```bash
|
||||
firewall-cmd --list-all
|
||||
# Or iptables -L
|
||||
```
|
||||
|
||||
3. Test locally:
|
||||
```bash
|
||||
snmpwalk -v2c -c public localhost system
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Permission Problems
|
||||
|
||||
### "Must be run as root" Error
|
||||
|
||||
Many scripts require root privileges:
|
||||
```bash
|
||||
sudo ./script.sh
|
||||
```
|
||||
|
||||
Or switch to root:
|
||||
```bash
|
||||
su -
|
||||
# or
|
||||
sudo -i
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## fstab Issues
|
||||
|
||||
### Mount Failures
|
||||
|
||||
```bash
|
||||
# Check if mount points exist
|
||||
ls -la /mnt/
|
||||
|
||||
# Create missing directories
|
||||
sudo mkdir -p /mnt/naspublic
|
||||
|
||||
# Test mount
|
||||
sudo mount -a -v
|
||||
|
||||
# Check logs
|
||||
journalctl -b | grep mount
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Network Troubleshooting
|
||||
|
||||
### DNS Issues
|
||||
|
||||
```bash
|
||||
# Check DNS resolution
|
||||
nslookup google.com
|
||||
dig google.com
|
||||
|
||||
# Check DNS server
|
||||
cat /etc/resolv.conf
|
||||
```
|
||||
|
||||
### Network Interface Down
|
||||
|
||||
```bash
|
||||
# Check interfaces
|
||||
ip addr show
|
||||
|
||||
# Bring interface up
|
||||
sudo ip link set eth0 up
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## System Logging
|
||||
|
||||
### View Update Logs
|
||||
|
||||
```bash
|
||||
# System update logs
|
||||
tail -f /var/log/auto_updates.log
|
||||
|
||||
# System journal
|
||||
journalctl -u cron -f
|
||||
```
|
||||
|
||||
### Collect System Information
|
||||
|
||||
```bash
|
||||
# Run diagnostic script
|
||||
./collect_info.sh
|
||||
|
||||
# View output
|
||||
cat info.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Recovery Procedures
|
||||
|
||||
### Restore fstab from Backup
|
||||
|
||||
```bash
|
||||
# Restore backup
|
||||
sudo cp /etc/fstab.bak /etc/fstab
|
||||
|
||||
# Or from date-stamped backup
|
||||
sudo cp /etc/fstab.bak.2024-01-01 /etc/fstab
|
||||
```
|
||||
|
||||
### Reinstall Docker
|
||||
|
||||
```bash
|
||||
# Purge Docker
|
||||
sudo apt purge docker.io docker-doc docker-compose podman-docker containerd runc
|
||||
|
||||
# Remove data
|
||||
sudo rm -rf /var/lib/docker
|
||||
|
||||
# Reinstall
|
||||
sudo ./docker/install_docker_debian.sh
|
||||
```
|
||||
|
||||
### Reset Pi-hole
|
||||
|
||||
```bash
|
||||
# Reinstall
|
||||
pihole -r
|
||||
|
||||
# Or complete reinstall
|
||||
sudo apt install --reinstall pihole
|
||||
```
|
||||
@@ -0,0 +1,151 @@
|
||||
# Windows Batch Files
|
||||
|
||||
Windows automation scripts for backups, file transfers, and system management.
|
||||
|
||||
---
|
||||
|
||||
## Backup Scripts
|
||||
|
||||
### `batch_files/ABC---Backup VM's.bat`
|
||||
|
||||
Backup virtual machines.
|
||||
|
||||
```batch
|
||||
# Usage: Run as Administrator
|
||||
# Creates backup of VM directories
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/Backup Videos.bat`
|
||||
|
||||
Video file backup utility.
|
||||
|
||||
**Features:**
|
||||
- Progress tracking
|
||||
- Timestamped logs
|
||||
- Destination: USB drive
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/Traver-desk VM Backup.bat`
|
||||
|
||||
Desktop VM backup.
|
||||
|
||||
**Scheduled usage:** Run daily via Task Scheduler.
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/Murder VM Backup.bat`
|
||||
|
||||
Game VM backup (likely Minecraft or similar).
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/familymedicalbackup.bat`
|
||||
|
||||
Family medical records backup.
|
||||
|
||||
---
|
||||
|
||||
## File Transfer Scripts
|
||||
|
||||
### `batch_files/Docker-Minecraft_backup.bat`
|
||||
|
||||
Minecraft server backup via Docker.
|
||||
|
||||
```batch
|
||||
# Stops container, backs up, restarts
|
||||
docker stop minecraft
|
||||
robocopy C:\Docker\Containers\Minecraft\Data E:\Backups\Minecraft
|
||||
docker start minecraft
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/Downloads Backup.bat`
|
||||
|
||||
Downloads folder backup.
|
||||
|
||||
**Destinations:**
|
||||
- NAS share
|
||||
- USB drive (rotation)
|
||||
|
||||
---
|
||||
|
||||
## Sync Scripts
|
||||
|
||||
### `batch_files/Sync Private Folders.bat`
|
||||
|
||||
Sync personal folders to NAS.
|
||||
|
||||
**Folders synced:**
|
||||
- Documents
|
||||
- Pictures
|
||||
- Desktop
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/Education to education nas.bat`
|
||||
|
||||
Educational materials backup.
|
||||
|
||||
---
|
||||
|
||||
## Drive Mapping
|
||||
|
||||
### `batch_files/Map Drives.bat`
|
||||
|
||||
Map network drives.
|
||||
|
||||
```batch
|
||||
net use Z: \\nas\public /persistent:yes
|
||||
net use Y: \\nas\media /persistent:yes
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `batch_files/NAS to 4tb Local USB.bat`
|
||||
|
||||
Full NAS to USB backup.
|
||||
|
||||
**Schedule:** Weekly full backup.
|
||||
|
||||
---
|
||||
|
||||
## Media Scripts
|
||||
|
||||
### `batch_files/IT work .bat`
|
||||
|
||||
Technical work folder sync.
|
||||
|
||||
### `batch_files/Pictures backup.bat`
|
||||
|
||||
Photo library backup.
|
||||
|
||||
### `batch_files/Skyrim Copy from Nas to Local.bat`
|
||||
|
||||
Game file download.
|
||||
|
||||
### `batch_files/Skyrim Copy to nas.bat`
|
||||
|
||||
Upload saved games to NAS.
|
||||
|
||||
---
|
||||
|
||||
## Command Reference
|
||||
|
||||
| Command | Purpose |
|
||||
|---------|---------|
|
||||
| `robocopy` | Robust file copy with progress |
|
||||
| `net use` | Map network drives |
|
||||
| `docker` | Container management |
|
||||
| `schtasks` | Schedule tasks |
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- Run as **Administrator** for full access
|
||||
- NAS must be accessible at configured IP
|
||||
- USB drives should be labeled consistently
|
||||
@@ -0,0 +1,152 @@
|
||||
# macOS Scripts
|
||||
|
||||
macOS automation and system management utilities.
|
||||
|
||||
---
|
||||
|
||||
## System Updates
|
||||
|
||||
### `mac-scripts/updates.sh`
|
||||
|
||||
Update Homebrew and system packages.
|
||||
|
||||
```bash
|
||||
# Update Homebrew
|
||||
brew update && brew upgrade
|
||||
|
||||
# Update Casks
|
||||
brew upgrade --cask
|
||||
|
||||
# Clean up
|
||||
brew cleanup
|
||||
brew autoremove
|
||||
```
|
||||
|
||||
**macOS Software Update:**
|
||||
```bash
|
||||
softwareupdate -l # List available
|
||||
softwareupdate -i -a # Install all
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `mac-scripts/system_updates.sh`
|
||||
|
||||
Interactive system update script.
|
||||
|
||||
**Features:**
|
||||
- macOS Software Update
|
||||
- Homebrew update
|
||||
- NPM update
|
||||
- Pip packages update
|
||||
|
||||
---
|
||||
|
||||
### `mac-scripts/brewscripts/update-brew-packages.sh`
|
||||
|
||||
Remove deprecated Homebrew casks.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
brew install --cask gstreamer # Install replacement
|
||||
./mac-scripts/brewscripts/update-brew-packages.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## .DS_Store Management
|
||||
|
||||
### `mac-scripts/disable_DS_store.sh`
|
||||
|
||||
Disable .DS_Store creation on network volumes.
|
||||
|
||||
```bash
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
|
||||
```
|
||||
|
||||
### `mac-scripts/DS_STore_destroy.sh`
|
||||
|
||||
Comprehensive .DS_Store cleanup.
|
||||
|
||||
**Features:**
|
||||
- Disable on USB/Network volumes
|
||||
- Add to global git ignore
|
||||
- Delete existing files
|
||||
- Restart Finder
|
||||
|
||||
---
|
||||
|
||||
## Window Management
|
||||
|
||||
### `mac-scripts/tile-windows/`
|
||||
|
||||
One-click window tiling using Hammerspoon.
|
||||
|
||||
#### Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `hammerspoon-init.lua` | Tiling logic |
|
||||
| `tile-windows.applescript` | Clickable app |
|
||||
|
||||
#### Setup
|
||||
|
||||
```bash
|
||||
# 1. Install Hammerspoon
|
||||
brew install --cask hammerspoon
|
||||
|
||||
# 2. Copy config
|
||||
cp mac-scripts/tile-windows/hammerspoon-init.lua ~/.hammerspoon/init.lua
|
||||
|
||||
# 3. Reload Hammerspoon
|
||||
hs -c "hs.reload()"
|
||||
```
|
||||
|
||||
#### Usage
|
||||
|
||||
- **Keyboard:** `Cmd+Ctrl+T`
|
||||
- **Dock:** Drag "Tile Windows.app" to Dock
|
||||
- **Menu:** Hammerspoon menubar → Reload All
|
||||
|
||||
---
|
||||
|
||||
## Homebrew Scripts
|
||||
|
||||
### `mac-scripts/brewscripts/`
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `update-brew-packages.sh` | Update Homebrew + casks |
|
||||
| `README.md` | Documentation |
|
||||
|
||||
---
|
||||
|
||||
## Tools Installed
|
||||
|
||||
The macOS setup installs these tools:
|
||||
|
||||
| Category | Tools |
|
||||
|----------|-------|
|
||||
| Development | git, python, node |
|
||||
| Networking | wireshark, nmap, openvpn |
|
||||
| Multimedia | vlc, ffmpeg |
|
||||
| Utilities | bashtop, htop |
|
||||
| Productivity | keepassxc, libreoffice |
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Run a script
|
||||
./mac-scripts/updates.sh
|
||||
|
||||
# Or with Zsh
|
||||
zsh mac-scripts/system_updates.sh
|
||||
```
|
||||
|
||||
> **Note:** Some scripts require Hammerspoon accessibility permissions.
|
||||
|
||||
### Grant Permissions
|
||||
|
||||
System Settings → Privacy & Security → Accessibility → Add Hammerspoon.app
|
||||
Reference in new issue
Block a user