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. Cloud Firewall
  6. /
  7. Setup Cloud Firewall
GUIDECloud Firewall

"How to Set Up Cloud Firewall Rules"

6 min read

Setting up cloud firewall rules on Data Mammoth is one of the most important security steps you can take after provisioning a server. A properly configured firewall blocks unwanted traffic at the network level, protecting your server from scanning bots, brute-force attacks, and unauthorized access.

This guide walks you through creating a firewall rule group, adding rules, and applying them to your servers.

Before You Begin

Before creating firewall rules, know which services your server runs and which ports they need:

  • SSH — Port 22 (TCP)
  • HTTP — Port 80 (TCP)
  • HTTPS — Port 443 (TCP)
  • MySQL/MariaDB — Port 3306 (TCP)
  • PostgreSQL — Port 5432 (TCP)
  • Redis — Port 6379 (TCP)
  • Custom applications — Whatever port your application listens on
Only allow the ports your server actually needs. Everything else should be blocked by default.

Step 1 — Navigate to Cloud Firewall

  • Log in to your Data Mammoth dashboard.
  • Click Network in the left sidebar.
  • Click Cloud Firewall.
  • The firewall management page displays your existing rule groups (if any) and options to create new ones.

    Step 2 — Create a Firewall Rule Group

    A rule group is a named collection of firewall rules that can be applied to one or more servers.

  • Click Create Rule Group or New Firewall Group.
  • Enter a descriptive name for the group, such as:
  • - "Web Server — HTTP/HTTPS + SSH" - "Database Server — Internal Only" - "Development Server — Open Ports"
  • Optionally, add a description explaining the group's purpose.
  • Click Create.
  • Your new rule group is created with no rules — which means all traffic is blocked (default deny). Now you need to add allow rules for the traffic you want to permit.

    Step 3 — Add Firewall Rules

    Click on your newly created rule group to open it, then click Add Rule.

    For each rule, configure the following fields:

    Direction

    • Inbound — Rules for traffic coming into your server from the internet.
    • Outbound — Rules for traffic leaving your server. (Outbound traffic is typically allowed by default.)
    Most rules you create will be inbound rules.

    Protocol

    • TCP — Used by most services (SSH, HTTP, HTTPS, databases).
    • UDP — Used by DNS, some game servers, VPN protocols.
    • ICMP — Used by ping. Allow this if you want your server to respond to ping requests.
    • All — Matches all protocols.

    Port

    • Enter a specific port number (e.g., 22).
    • Enter a port range (e.g., 8000-9000).
    • Select All ports if the rule should apply to any port.

    Source (for inbound rules)

    • Any / 0.0.0.0/0 — Allow traffic from any IP address. Use this for public services like HTTP and HTTPS.
    • Specific IP — Allow traffic only from a specific IP address (e.g., 203.0.113.50/32). Use this for SSH and admin access.
    • IP range (CIDR) — Allow traffic from a range of IPs (e.g., 203.0.113.0/24 for the entire 203.0.113.x subnet).

    Action

    • Allow — Permit the matching traffic.
    • Deny — Block the matching traffic (usually the default for non-matching rules).

    Example: Essential Web Server Rules

    Add these rules for a typical web server:

    DirectionProtocolPortSourceActionPurpose
    InboundTCP22Your IP (e.g., 203.0.113.50/32)AllowSSH access from your IP only
    InboundTCP80Any (0.0.0.0/0)AllowHTTP web traffic
    InboundTCP443Any (0.0.0.0/0)AllowHTTPS web traffic
    InboundICMPAllAny (0.0.0.0/0)AllowPing (optional)
    All other inbound traffic is blocked by the default deny policy.

    Click Save or Add Rule after configuring each rule.

    Step 4 — Apply the Rule Group to Your Server

    After creating your rules, assign the rule group to one or more servers:

  • Navigate to the firewall rule group page.
  • Click Apply to Server or Assign Server.
  • Select the server(s) from your list of active servers.
  • Click Apply or Save.
  • The firewall rules take effect within seconds. Your server is now protected.

    Alternative: Assign from the Server Detail Page

    You can also assign firewall groups from the server's management page:

  • Navigate to Services and click on your server.
  • Click the Firewall tab.
  • Select the rule group to assign.
  • Click Apply.
  • Step 5 — Verify Your Firewall Rules

    After applying rules, verify that they work as expected:

    Test Allowed Access

    • SSH — Connect via SSH from your allowed IP. If it works, the SSH rule is correct.
    • Web — Open your server's IP in a browser (e.g., http://203.0.113.10). If the page loads, HTTP is allowed.

    Test Blocked Access

    • Try accessing a port that should be blocked (e.g., try to connect to port 3306 from the internet). The connection should time out or be refused.
    • If you have access from a different IP address (e.g., your phone on mobile data), try SSHing from that IP. It should be blocked if you restricted SSH to your specific IP.

    Managing Firewall Rules

    Editing Rules

  • Open the rule group.
  • Click Edit next to the rule you want to change.
  • Modify the fields as needed.
  • Click Save.
  • Changes apply instantly to all servers using the rule group.

    Reordering Rules

    Firewall rules are typically evaluated in order. Rules higher in the list take precedence. Drag rules to reorder them if your firewall supports rule priority.

    Deleting Rules

  • Open the rule group.
  • Click Delete next to the rule you want to remove.
  • Confirm the deletion.
  • Warning: Deleting an allow rule for SSH may lock you out of your server. Always make sure you have at least one way to access your server before removing access rules.

    Unassigning a Rule Group

    To remove a firewall rule group from a server:

  • Navigate to the server's Firewall tab or the rule group's assignment page.
  • Click Remove or Unassign next to the server.
  • Warning: Removing all firewall groups may leave your server with no firewall protection (or a default-allow policy, depending on the configuration). Always verify the resulting security posture.

    Creating Multiple Rule Groups

    Use separate rule groups for different server types:

    • "Web Server Rules" — SSH + HTTP + HTTPS.
    • "Database Rules" — SSH + database port from specific IPs only.
    • "Game Server Rules" — SSH + game-specific ports.
    • "Management Only" — SSH only, from specific IPs.
    This modular approach lets you reuse rule groups across servers and update them centrally.

    What to Do Next

    • Cloud Firewall Best Practices — Advanced security strategies.
    • Common Firewall Rules — Pre-built rules for popular services.
    • Cloud Firewall vs iptables — Understand when to use each.
    • Troubleshooting Cloud Firewall Issues — Fix common firewall problems.

    Was this article helpful?

    ← Back to Cloud FirewallBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket