Bobcares

WHM multiple shared IP addresses – 2 easy ways to set it up

by | Dec 9, 2018

It would really make my life easier If I could add multiple shared IP addresses in WHM. Can you help me?

That was a recent support ticket received at our Server Support department where we resolve support queries for web hosts.

Server owners need multiple shared IP addresses in servers to group accounts per IP, minimize the effect of DDOS attacks, etc.

But, WHM allows you to have only one main shared IP address by default.

So, what can be the next option? Fortunately, there is a workaround for this.

Today, let’s discuss how our Server Support Engineers assist server owners setup multiple shared IP addresses in WHM.

 

How to setup multiple shared IP addresses in WHM?

There are 2 easy methods to setup WHM multiple shared IP addresses.

1) Reserve the IPs in WHM

This is one of the easy ways to setup multiple IP addresses in WHM.

Now, let’s see how our Support Engineers set it up on a cPanel server.

 

a) Add the new IP address to WHM

Firstly, we add the new IP address to the server.

We add it via WHM from IP Functions > Add a New IP Address option.

whm multiple shared ip addresses

Add A New IP Address option in WHM

 

b) Reserve the IP addresses

Secondly, we reserve the new IP address in the server.

Therefore, this will prevent the IPs from being used as dedicated IPs for individual cPanel accounts.

To do this, we add the IPs to the reserved list using the below steps.

  • Go to WHM > IP Functions > Show/Edit Reserved IPs.
  • Check the IP to be reserved and add reason for reserving.
  • Click Save.

 

Alternatively, we add the IPs to be reserved in the file “/etc/reservedips” as shown below.

125.xx.54x.12x = shared ip
125.xx.xx.1x6 = shared ip

 

Here, first parameter is the IP address and the second is the reason for reserving the IP.

 

c) Rebuild the IP pool

Next step is to rebuild the IP pool.

This scans and determines the unused IP addresses in the server and adds it to the IP address pool.

As a result, when WHM creates new accounts, it uses the IP addresses from this pool.

Our Support Engineers rebuild the IP address pool from WHM > IP Functions > Rebuild the IP Address Pool.

whm multiple shared ip addresses

Rebuild IP Pool option in WHM

 

Alternatively, we use the below script to rebuild the IP address pool.

/scripts/rebuildippool

 

d) Add the IP in mainips file

For multiple accounts to use these IPs as shared IP addresses, we add them to a pool.

For that, we follow the below steps.

  • Create a folder /var/cpanel/mainips if it not exists.
  • After that, create a file /var/cpanel/mainips/root.
  • Further, add each IP in a single line.
  • Finally, save the file.

 

So, when root creates an account, the first IP address in the file will be used.

Likewise, if a reseller needs multiple shared IP addresses, simply replace this filename with the reseller username.

Also, our Support Engineers create custom scripts in the server for IP rotation so that each IP in the pool gets equally used.

[Need assistance to setup multiple shared IP addresses in WHM? Our Support Engineers are here for your help!]

2) Create Reseller Accounts

Now, let’s see the second option to use multiple shared IP addresses in WHM.

The idea is to create a reseller account and share the reseller’s IP with the accounts under this reseller.

Our Support Engineers follow the below steps for this.

  • Create a new account using the Create a New Account option.
  • Then, modify the account and assign Reseller privileges.
  • Assign a free IP to that account from Manage Reseller’s Shared IP feature in WHM.
  • Go to WHM > IP Functions > Change Site’s IP address area and assign the new IP.
  • Then, create new accounts under this reseller and share that IP for these accounts.

You’re done!! You have multiple shared IP addresses on your server.

 

Conclusion

In short, server owners need multiple shared IP addresses in servers to group accounts per IP, minimize the effect of DDOS attacks. Today, we’ve seen the 2 easy steps to add multiple shared IP addresses in WHM and how our Server Support Engineers implement it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF