The Importance of Reserved IP Addresses in cPanel/WHM
Managing IP addresses correctly in a hosting environment is crucial for security, stability, and preventing accidental service disruption. In cPanel/WHM, one of the most overlooked features is the Reserved IPs system — a mechanism that prevents specific IP addresses from being used or reassigned improperly.
Understanding IP Address Roles in cPanel
Before diving into reserved IPs, it’s essential to clarify the different types of IP addresses commonly used within cPanel/WHM. Each has a purpose, and mixing these roles can cause serious hosting issues.
1. Main Server IP
This is the default primary IP address of the server. It is used for:
- Server hostname
- System services (SSH, cPanel ports, SMTP/Exim, etc.)
- Licensing for cPanel and other software
- Reverse DNS (rDNS) and email reputation
Why it matters: If another user or reseller accidentally “takes over” this IP or assigns an unrelated site to it, the server hostname, SSL, and email reputation can be severely disrupted.
2. Shared IP
On a typical cPanel server, the shared IP is the default IP for all newly created accounts unless otherwise specified. All sites belonging to the main (root) hosting environment use this IP unless a dedicated IP is assigned.
In many setups, the shared IP is the main IP. But it doesn’t have to be — and very often it should not be.
3. Reseller Shared IP
Each reseller can have their own “default” shared IP, used for all accounts they create. This ensures isolation between resellers and prevents conflicts with the main shared IP of the root user.
- Improves IP reputation separation between resellers
- Prevents a reseller from using the server’s main IP
- Simplifies SSL and DNS management
What Are Reserved IP Addresses?
Reserved IPs are IP addresses that are protected by WHM and cannot be accidentally assigned to user accounts, resellers, or domains. The feature is available under:
WHM » IP Functions » Show/Edit Reserved IPs
In practice, it means WHM blocks the use of any IP marked as reserved unless explicitly overridden by the server administrator. This prevents accidental misuse, especially in environments where multiple staff members or resellers manage accounts.
Why Reserved IPs Are Critically Important
Reserved IPs are often treated as optional, but in reality, they form a critical layer of safety. Here are the main reasons they matter.
1. Preventing Main IP Hijacking
Imagine a standard scenario:
- A reseller creates a new hosting account
- They notice “Dedicated IP” is available
- They accidentally assign the main server IP
Consequence: The main server hostname IP now points to a client website. This can break:
- cPanel license validation
- Hostname SSL
- Service routing
- Email rDNS alignment
- Mail deliverability
- External monitoring tools
In extreme cases, the client site unintentionally becomes the default server website, exposing it to unwanted traffic.
2. Protecting IP Reputation
IP addresses used for email service should be isolated and protected. If a reseller or hosting account accidentally uses the mail IP for a compromised website, the entire server’s email deliverability could be blacklisted.
3. Preventing SSL Conflicts
The hostname SSL certificate is bound to a specific IP. If another site gets assigned to that IP, the certificate can break and clients will receive warning messages when accessing WHM, cPanel, or Webmail interfaces.
Recommended Healthy IP Setup for cPanel Servers
1. Main IP (Reserved)
- Used by hostname
- Used by system services
- Should be reserved to prevent accidental use
- Should not be shared with customer accounts
This ensures stable licensing, DNS, and SSL.
2. Shared IP for the Primary (Root) Shared Hosting Environment
- Separate from the main server IP
- Used for all accounts created by the root user
- Should not be used for reseller accounts
3. Per-Reseller Shared IPs (If Multiple Resellers)
- Each reseller gets their own default shared IP
- All accounts they create use this IP
- Prevents cross-contamination between reseller services
- Improves tracking and reputation management
Bonus Tip: How Reserved IPs Actually Work (With Useful Commands)
Reserved IPs in cPanel/WHM are controlled through a simple yet powerful mechanism. Understanding how these IPs are stored, viewed, and validated helps administrators avoid serious misconfigurations. Below are the key concepts and command examples you can use directly on your server.
Where Reserved IPs Are Stored
All reserved IP definitions are kept in the file:
/etc/reservedips
Each line represents an IP address and optional restrictions. For example:
192.0.2.10 user1
192.0.2.11
203.0.113.5 mail
This means:
- 192.0.2.10 is reserved and blocked from being assigned to user
user1 - 192.0.2.11 is completely reserved
- 203.0.113.5 may not be used for mail-related services
Checking if an IP Is Reserved Using Grep
If you want to check whether a specific IP exists in the reserved list, use the grep command:
grep "192.0.2.11" /etc/reservedips
If the IP is reserved, the line will be returned. If not, grep produces no output.
You can also list all reserved IPs with:
cat /etc/reservedips
Using WHM’s API to List Reserved IPs
WHM provides an API endpoint to list all reserved IP addresses. This is useful for automation, scripts, and monitoring tools. To output the list in JSON, use:
whmapi1 list_reserved_ips --output=json
To display in a more readable format (YAML):
whmapi1 list_reserved_ips
Filtering Reserved IPs with jq
If your server has jq installed, you can filter or search through the JSON output. For example, to find a specific IP:
whmapi1 list_reserved_ips --output=json \
| jq -r '.data.reservedips[] | select(.ip=="192.0.2.11")'
This returns the block describing that IP, if reserved.
To list all reserved IPs only (ignoring restrictions):
whmapi1 list_reserved_ips --output=json \
| jq -r '.data.reservedips[].ip'
To view all reserved IPs along with their assigned restrictions:
whmapi1 list_reserved_ips --output=json \
| jq -r '.data.reservedips[] | "\(.ip) → \(.reserved_for)"'
Why Knowing These Commands Matters
Using these commands, administrators can:
- Automate verification of IP allocations
- Prevent resellers or staff from misassigning critical IPs
- Monitor and audit IP usage with scripts
- Quickly troubleshoot misconfigurations
Combined with a proper IP architecture, reserved IPs drastically reduce the risk of downtime, SSL breakage, rDNS issues, and email deliverability problems.
Conclusion
IP management in cPanel is often underestimated but has a profound impact on server reliability, DNS integrity, SSL validity, and email deliverability. By properly defining:
- A dedicated main IP
- A shared IP for general hosting
- Optional reseller shared IPs
- And reserving critical IPs to prevent misuse
…you ensure a cleaner, safer, and more stable hosting environment. Reserved IPs are a small configuration step with major benefits — don’t overlook them!