Bobcares

VestaCP change IP address – Quick way to do it

by | Jun 23, 2019

Managing servers with free VestaCP control panel make things easier for Web Hosts. However, due to IP blacklisting or server migration, server owner may need a VestaCP IP address change.

Luckily, VestaCP has a feature to change IP address with simple steps. But, wrong IP address create problems with admin panel and websites.

At Bobcares, we often get requests from our customers to change the IP address in VestaCP as part of our Server Management Services.

Today, we’ll see how our Support Engineers change the IP address in VestaCP and fix related errors.

 

Need for Changing the IP address

Web users may need to change their server IP address for several reasons. Sometimes, the need may arise when the current server IP address gets blacklisted or because of server migration. Again, in shared servers, many customers use same IP address within a server. Thus, in such cases, they may need to change their main shared IP address too.

Let’s see how our Support Engineers change the IP address in VestaCP.

 

How we perform VestaCP change IP address

Basically, websites and emails need the IP address to work effectively. If any change occurs in the IP address may badly affect on both websites and emails.

Also, its pretty straight forward to use VestaCP to change the IP address.

1. Initially, we create a file v-change-server-ip.

touch /usr/local/vesta/bin/v-change-server-ip

2. Then we set permission 0755 to the file v-change-server-ip.

chmod 0755 /usr/local/vesta/bin/v-change-server-ip

3. After that, we open the file and paste a code that changes all old IP to new IP (The code is available from the Github – Look for GreenRobot777/v-change-server-ip in GitHub).

4. At last, we run the following command.

v-change-server-ip OLDIP NEWIP

This is how we change the IP address in VestaCP servers.

Finally, after changing the IP address, the VestaCP interface looks like following.

How we fixed the common errors

From our experience in managing servers, we’ve seen customers facing problems after changing the IP address in VestaCP. Let’s take a closer look at how our Support Engineers fixed these problems.

 

1. VestaCP admin panel not working

Recently, one of our customers contacted us with an error in VestaCP admin panel. He couldn’t access the Vestacp admin panel after changing the old server IP address to a new one.

Then our Support Engineers took the following steps to solve the issue.

1. To begin with, we logged into the server as a root user.

2. Then we ran the following command to update Vesta’s system IP address.

/usr/local/vesta/bin/v-update-sys-ip

That fixed the problem and admin panel became accessible on the new IP address.

 

2. Service down

Any server can crash due to faulty hardware. Such service down also create a need for VestaCP IP change.

For example, VPS hosting providers have to migrate the servers when the physical servers crash. And, they use backup from old servers while restoring individual backups. And, if we haven’t changed the VestaCP’s IP address, there may be an error in the VestaCP Admin panel. Also, we can’t log in to the admin panel with a new IP address.

In addition, services like httpd and nginx may not work with old IP address and cause website down issues.

Moreover, if you try to start the service httpd, you may get an error like,

[Sun May 04 05:50:16 2019] [warn] NameVirtualHost X.X.X.X:8443 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address X.X.X.X:8080
no listening sockets available, shutting down
Unable to open logs
Starting httpd: [FAILED]

Similarly, the error in Nginx will appear as

nginx: [emerg] bind() to X.X.X.X:80 failed (99: Cannot assign requested address)
Starting nginx: [FAILED]

Here, our Support Engineers had to manually change the old IP with the new IP address.

 

[Having trouble while changing the IP address in VestaCP? We’ll fix it for you.]

 

Conclusion

In short, VestaCP IP address change involves an update in both VestaCP and web server configuration. The need for IP change arises during server migration or when the current server IP address gets blacklisted. Today, we saw how our Support Engineers changed the IP address in VestaCP and fixed related errors.

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.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

4 Comments

  1. Harsh Jain

    You forgot to add the github link.

    Reply
    • Sijin George

      Hello Harsh,
      It is readily available in Github and can find by a simple search.

      Reply
  2. mehran

    Hello
    I did not found you on Github, Would you please share

    Reply
    • Sijin George

      Hello Mehran,
      Look for GreenRobot777/v-change-server-ip in GitHub

      Reply

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