# Debian Setup Notes # User Groups (admin) ```sudo usermod -aG sudo,adm,docker,dialout,plugdev,netdev,systemd-journal $USER``` # setup sources.list deb http://debian.osuosl.org/debian/ testing main non-free-firmware contrib non-free deb http://security.debian.org/debian-security testing-security main non-free-firmware contrib non-free deb http://debian.osuosl.org/debian/ testing-updates main non-free-firmware contrib non-free # Essential packages ``` apt install ncdu btop tmux fish fail2ban ripgrep rsync btrfs-progs htop mosh p7zip iperf3 fd-find mc kitty-terminfo curl git bat unrar rclone rar gocryptfs cryfs securefs wireguard lzop lz4 ``` # RSYNC key home files, folders ``` 10.8.0.2:~/.local/bin ~/.local/ 10.8.0.2:~/.tmux.conf ~/ ``` # Add Docker's official GPG key: ``` sudo apt update sudo apt install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc ``` # Add the repository to Apt sources: ``` sudo tee /etc/apt/sources.list.d/docker.sources < /etc/wireguard/server_public.key chmod 600 /etc/wireguard/server_private.key ``` ### Config File Example ``` # /etc/wireguard/wg0.conf [Interface] Address = 10.8.0.1/24 ListenPort = 51820 PrivateKey = PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Client 1 (Zion) [Peer] PublicKey = AllowedIPs = 10.8.0.2/32 # Client 2 (Galaxy) [Peer] PublicKey = AllowedIPs = 10.8.0.99/32 ``` ## Enable IP forwarding ``` echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf sudo sysctl -p # Start and enable sudo systemctl enable --now wg-quick@wg0 ``` ### WG Quick reference ``` # Check status sudo wg show # Restart sudo systemctl restart wg-quick@wg0 # View handshake sudo wg show wg0 latest-handshakes # Check status sudo wg show # Restart sudo systemctl restart wg-quick@wg0 # View handshake sudo wg show wg0 latest-handshakes ``` # Samba # fstab