π ~1 min read
Table of contents
Symptom & Impact
Required ports are unreachable after enabling UFW policy changes.
Environment & Reproduction
Issue appears when default deny policy is enabled without explicit allow rules.
sudo ufw status verbose
ss -tulpn
Root Cause Analysis
Missing or misordered UFW rules drop expected inbound or routed traffic.
Quick Triage
Verify active listening ports and corresponding firewall rules.
ss -tulpn
sudo ufw status numbered
Step-by-Step Diagnosis
Match service bind addresses to firewall scope and interface directions.
ip -br a
sudo ufw show added
sudo iptables -S | head -n 80

Solution – Primary Fix
Add precise allow rules for required ports and source ranges.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo ufw allow 22/tcp
sudo ufw allow 443/tcp
sudo ufw reload
sudo ufw status verbose

Solution – Alternative Approaches
Create application profiles or temporary broad rules for incident mitigation.
sudo ufw allow from 192.0.2.0/24 to any port 8443 proto tcp
Verification & Acceptance Criteria
Service becomes reachable while default deny posture remains intact.
sudo ufw status numbered
curl -I http://localhost:8080
Rollback Plan
Delete recently added rules if they expose unintended access.
sudo ufw status numbered
sudo ufw delete
Prevention & Hardening
Use rule baselines and staged policy testing before production enforcement.
sudo ufw logging on
sudo ufw status verbose
Related Errors & Cross-Refs
Related symptoms include connection timeout and no route through host firewall.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
UFW manual and Ubuntu firewall best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.