Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. Troubleshooting
  6. /
  7. Firewall Blocking Traffic
GUIDETroubleshooting

Firewall Blocking Legitimate Traffic

4 min read

If your services suddenly become unreachable even though the server is running, the firewall may be blocking legitimate traffic. This is common after firewall configuration changes, server migrations, or security hardening. This guide helps you identify and fix overly restrictive firewall rules.

Symptoms

  • Website returns connection timeout (not a 403 or 500 error).
  • SSH connection times out or is refused.
  • Application ports are unreachable from outside the server.
  • Services work when accessed locally on the server but not remotely.

Step 1 — Verify the Issue Is Firewall-Related

From your local machine, test connectivity:

bash
# Test web ports
nc -zv 203.0.113.10 80
nc -zv 203.0.113.10 443

Test SSH

nc -zv 203.0.113.10 22

If these time out, the firewall or network is blocking traffic.

From the server itself (via web console if SSH is blocked):

bash
# Check if the service is listening
ss -tuln | grep :80
ss -tuln | grep :443
ss -tuln | grep :22

If the service is listening locally but unreachable remotely, the firewall is likely the cause.

Step 2 — Check Firewall Status

UFW (Ubuntu/Debian)

bash
sudo ufw status verbose

Look for rules that should allow the blocked traffic. If you see Status: active but no rules for the needed ports, traffic is being denied by the default policy.

firewalld (CentOS/AlmaLinux)

bash
sudo firewall-cmd --list-all

Check the services and ports sections for the required entries.

iptables (Direct)

bash
sudo iptables -L -n --line-numbers

Look for DROP or REJECT rules that match the blocked traffic.

Step 3 — Fix the Rules

Allow Web Traffic

bash
# UFW
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

firewalld

sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload

Allow SSH

bash
# UFW
sudo ufw allow 22/tcp

firewalld

sudo firewall-cmd --permanent --add-service=ssh sudo firewall-cmd --reload

Allow Custom Port

bash
# UFW
sudo ufw allow 8080/tcp

firewalld

sudo firewall-cmd --permanent --add-port=8080/tcp sudo firewall-cmd --reload

Step 4 — Emergency: Disable Firewall Temporarily

If you are locked out and cannot determine the blocking rule, temporarily disable the firewall to restore access:

Via Web Console:

bash
# UFW
sudo ufw disable

firewalld

sudo systemctl stop firewalld

iptables

sudo iptables -F

Important: This removes all firewall protection. Re-enable and properly configure the firewall as soon as possible.

Common Firewall Mistakes

1. Enabling Firewall Without SSH Rule

The most common lockout: enabling a firewall without first allowing SSH.

Prevention: Always add SSH before enabling:

bash
sudo ufw allow ssh
sudo ufw enable

2. Blocking All Incoming by Default

Setting default deny incoming without adding any allow rules blocks everything.

Fix: Add rules for all needed services before or immediately after setting the default policy.

3. Docker Bypassing UFW

Docker modifies iptables directly, potentially bypassing UFW rules. See Installing Docker & Docker Compose for Docker-specific firewall configuration.

4. Fail2ban Blocking Your IP

Fail2ban may have banned your IP address after failed login attempts.

Check:

bash
sudo fail2ban-client status sshd

Unban your IP:

bash
sudo fail2ban-client set sshd unbanip YOUR_IP_ADDRESS

5. IP Whitelist Too Restrictive

If you restricted SSH to specific IPs and your IP changed:

bash
# Add your new IP
sudo ufw allow from NEW_IP to any port 22

Step 5 — Verify the Fix

After updating firewall rules, test from your local machine:

bash
# Test web
curl -I http://203.0.113.10

Test SSH

ssh [email protected]

Test specific port

nc -zv 203.0.113.10 8080

Firewall Configuration Best Practices

  • Always allow SSH first before enabling a firewall.
  • Test rules in a separate terminal before closing your current SSH session.
  • Keep the web console accessible as a backup. See Using the Web Console.
  • Document your rules so you know what should be allowed.
  • Use ufw status regularly to review active rules.
  • Test from outside after every firewall change.
  • What to Do Next

    • Server Firewall Hardening Guide — Proper firewall configuration.
    • Using the Web Console — Access when SSH is blocked.
    • Website Down — Quick Diagnosis — Full troubleshooting flow.
    • How to Submit a Support Ticket — Get expert help.

    Was this article helpful?

    ← Back to TroubleshootingBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket