I’m setting up my newest secure Linux environment to run the Ywallet and Zingo wallets. If anyone wants to help me, I’ll install Debian 13 and do this:
#!/bin/bash
# =========================================================
# Minimal secure firewall for YWallet / Zingo (Global)
# =========================================================
# This script configures firewalld to:
# 1. Block all traffic by default
# 2. Allow only essential services for YWallet / Zingo
# - HTTPS (443 TCP)
# - DNS (53 TCP/UDP)
# - NTP (123 UDP)
# 3. Block all IPv6 traffic
# 4. No HTTP (80 TCP) is allowed for maximum security
# =========================================================
echo “Starting global secure firewall configuration for YWallet/Zingo…”
# -------------------------------
# Enable firewalld and start it
# -------------------------------
sudo systemctl enable --now firewalld
echo “Firewalld is now active.”
# -------------------------------
# Set default zone to DROP (block everything by default)
# -------------------------------
sudo firewall-cmd --set-default-zone=drop
echo “Default zone set to DROP (all traffic blocked by default).”
# -------------------------------
# Allow essential services
# -------------------------------
# Allow HTTPS (secure web communication)
sudo firewall-cmd --zone=drop --add-service=https --permanent
# Allow DNS (resolve domain names)
sudo firewall-cmd --zone=drop --add-service=dns --permanent
# Allow NTP (time synchronization)
sudo firewall-cmd --zone=drop --add-service=ntp --permanent
echo “Essential services allowed: HTTPS, DNS, NTP.”
# -------------------------------
# Configure NTP for global servers
# -------------------------------
# Allow UDP port 123 to all IPv4 addresses
sudo firewall-cmd --zone=drop --add-rich-rule=‘rule family=“ipv4” source address=“0.0.0.0/0” port port=“123” protocol=“udp” accept’ --permanent
echo “NTP allowed for global servers.”
# -------------------------------
# Block IPv6 completely
# -------------------------------
sudo firewall-cmd --zone=drop --remove-service=dhcpv6-client --permanent
sudo firewall-cmd --zone=drop --add-rich-rule=‘rule family=“ipv6” drop’ --permanent
echo “All IPv6 traffic blocked.”
# -------------------------------
# Apply all changes
# -------------------------------
sudo firewall-cmd --reload
echo “Firewall configuration applied successfully!”
# -------------------------------
# Show current status
# -------------------------------
echo “======================”
echo “Current firewalld configuration:”
sudo firewall-cmd --list-all
echo “======================”
echo “Firewall is now ready for secure global use with YWallet and Zingo!”