Security
Security
Firewall & Security Configuration
⚠️ Critical Security Setup - Configure UFW firewall to secure your Namada infrastructure.
Replace placeholders:
yourdomain.com- Your actual domain
✅ Firewall Setup (UFW)
Why Firewall Configuration Matters
Proper firewall setup is critical for:
Security - Block unauthorized access
Service Protection - Expose only necessary ports
DDoS Mitigation - Reduce attack surface
Compliance - Follow security best practices
⚠️ Important Notes
Before starting:
Ensure you have console/KVM access to your server
SSH access might be temporarily interrupted
Test immediately after applying rules
Keep a recovery method ready
✅ Installation & Configuration
1. Update System
2. Install UFW
3. Apply UFW Configuration
Expected output:
✅ Verification & Testing
4. Test All Services Immediately
⚠️ CRITICAL: Test immediately after enabling firewall!
Expected responses:
RPC: JSON response with node status
Indexer: List of validators in JSON
UI: HTML content
MASP Indexer:
{"block_height": ...}Peers:
"n_peers": "10"(or similar number)
✅ Monitoring
5. Monitor for Issues
Check Validator Peers
✅ Troubleshooting
6. Emergency Disable (If Services Fail)
⚠️ Only use if critical services are down!
Common Issues & Solutions
Issue 1: SSH Connection Lost
Symptom: Cannot connect via SSH after enabling firewall
Solution:
Issue 2: Validator Not Connecting to Peers
Symptom: n_peers: 0 or very low peer count
Solution:
Issue 3: NGINX Services Not Accessible
Symptom: 403/502/504 errors on web endpoints
Solution:
Issue 4: Docker Services Can't Connect
Symptom: Indexers can't reach RPC/database
Solution:
✅ Advanced Security Rules
Additional Hardening (Optional)
IP Whitelisting for Admin Access
✅ Firewall Rules Summary
22
TCP
SSH
ALLOW
Remote server access
80
TCP
HTTP
ALLOW
NGINX HTTP (redirects)
443
TCP
HTTPS
ALLOW
NGINX HTTPS (secure)
26656
TCP
CometBFT P2P
ALLOW
Validator peer connections
26657
TCP
Namada RPC
ALLOW
RPC API access
26658
TCP
Namada ABCI
DENY
Internal only (security)
5000
TCP
MASP Indexer
-
Proxied via NGINX
5001
TCP
Namada Indexer
-
Proxied via NGINX
5432
TCP
PostgreSQL
-
Docker internal only
Note: Ports 5000, 5001, and 5432 are NOT exposed to the internet - they're only accessible via NGINX reverse proxy (443) or Docker internal network.
✅ Quick Command Reference
✅ Post-Configuration Checklist
After enabling firewall, verify:
✅ Security Best Practices
Never expose database ports (5432) to the internet
Always use HTTPS for public endpoints
Enable rate limiting for SSH (use
ufw limit 22/tcp)Monitor logs regularly for suspicious activity
Keep firewall rules minimal - only open what's necessary
Use IP whitelisting for administrative access when possible
Regular security audits - review open ports monthly
Enable fail2ban for additional protection against brute force
✅ Additional Resources
Last updated