{"id":3108,"date":"2014-03-04T21:20:01","date_gmt":"2014-03-04T21:20:01","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=2431"},"modified":"2014-03-04T21:20:01","modified_gmt":"2014-03-04T21:20:01","slug":"change-primary-ip-address-whmcpanel-server","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2014\/03\/04\/change-primary-ip-address-whmcpanel-server\/","title":{"rendered":"How To Change The Primary IP Address Of A WHM\/cPanel Server"},"content":{"rendered":"<p>Steps in WHM:<\/p>\n<ul>\n<li>Log into WHM and go to\u00a0<b>Basic cPanel &amp; WHM Setup<\/b><\/li>\n<li>Change the Primary IP here with the option that says &#8220;<i>The IP address (only one address) that will be used for setting up shared IP virtual hosts<\/i>&#8220;<\/li>\n<li>Note: This might not actually be necessary.<\/li>\n<\/ul>\n<p>Log in to SSH, and do the following:<\/p>\n<ol>\n<li>Edit\u00a0<b>\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/b>\n<ul>\n<li>Change the\u00a0<b>IPADDR<\/b>\u00a0and\u00a0<b>GATEWAY<\/b>\u00a0lines to match the new IP and Gateway for the new ip<\/li>\n<\/ul>\n<\/li>\n<li>Edit\u00a0<b>\/etc\/sysconfig\/network<\/b>\n<ul>\n<li>Change the\u00a0<b>GATEWAY<\/b>\u00a0line here if it does not exist in the ifcfg-* file.<\/li>\n<\/ul>\n<\/li>\n<li>Edit\u00a0<b>\/etc\/ips<\/b>\n<ul>\n<li>Remove the new primary IP from this file if it is present<\/li>\n<li>Add the old primary IP to this file with the format\u00a0<b>&lt;IP address&gt;:&lt;Net Mask&gt;:&lt;Gateway&gt;<\/b><\/li>\n<\/ul>\n<\/li>\n<li>Edit\u00a0<b>\/var\/cpanel\/mainip<\/b>\n<ul>\n<li>Replace the old primary IP with the new primary IP<\/li>\n<\/ul>\n<\/li>\n<li>Edit\u00a0<b>\/etc\/hosts<\/b>\n<ul>\n<li>Replace the old primary IP with the new one if needed. The hostname&#8217;s\u00a0<a>dns<\/a>will need to be updated too<\/li>\n<\/ul>\n<\/li>\n<li>Restart the network\u00a0<a>service<\/a>\u00a0to make the new IP the primary\n<ul>\n<li><b>service network restart<\/b><\/li>\n<li><b>Note:<\/b>\u00a0You&#8217;re probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.<\/li>\n<\/ul>\n<\/li>\n<li>Restart the ipaliases script to bring up the additional IPs\n<ul>\n<li><b>service ipaliases restart<\/b><\/li>\n<\/ul>\n<\/li>\n<li>Run\u00a0<b>ifconfig<\/b>\u00a0and make sure all IPs show up correctly<\/li>\n<li>Update the cpanel license to the new primary IP<\/li>\n<li>Verify you can still log in to WHM and there is no license warning\n<ul>\n<li><a href=\"http:\/\/verify.cpanel.net\/index.cgi\" rel=\"nofollow\">http:\/\/verify.cpanel.net\/index.cgi<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 class=\"zemanta-related-title\" style=\"margin: 0 0 10px 0; padding: 0; clear: both;\">Related articles across the web<\/h3>\n<ul class=\"zemanta-article-ul zemanta-article-ul-image\" style=\"margin: 0; padding: 0; overflow: hidden;\">\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/servertesa.wordpress.com\/2013\/09\/26\/server-setup-configuration-cpanel-whm\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_14_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/servertesa.wordpress.com\/2013\/09\/26\/server-setup-configuration-cpanel-whm\/\" target=\"_blank\" rel=\"noopener noreferrer\">Server Setup &amp; Configuration &#8211; cPanel \/ WHM<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/pawapv.wordpress.com\/2013\/08\/02\/add-or-remove-ip-address-via-shell-on-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_7_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/pawapv.wordpress.com\/2013\/08\/02\/add-or-remove-ip-address-via-shell-on-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Add or Remove Ip address via Shell on cPanel\/WHM server<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/wiki.hetzner.de\/index.php?title=CPanel\/en&amp;diff=17997&amp;oldid=prev\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_8_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/wiki.hetzner.de\/index.php?title=CPanel\/en&amp;diff=17997&amp;oldid=prev\" target=\"_blank\" rel=\"noopener noreferrer\">CPanel\/en<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/linuxnlenux.wordpress.com\/2013\/07\/28\/how-to-enable-whm-login-notification-in-cpanel-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_2_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/linuxnlenux.wordpress.com\/2013\/07\/28\/how-to-enable-whm-login-notification-in-cpanel-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to enable WHM login notification in Cpanel Server ?<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/linuxnlenux.wordpress.com\/2013\/08\/11\/how-to-enable-whm-login-notification-in-cpanel-server-2\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/192811642_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/linuxnlenux.wordpress.com\/2013\/08\/11\/how-to-enable-whm-login-notification-in-cpanel-server-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to enable WHM login notification in Cpanel Server ?<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/www.daniweb.com\/hardware-and-software\/linux-and-unix\/threads\/470280\/add-ipv6-nameservers-in-dedicated-server-and-whm\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_13_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/www.daniweb.com\/hardware-and-software\/linux-and-unix\/threads\/470280\/add-ipv6-nameservers-in-dedicated-server-and-whm\" target=\"_blank\" rel=\"noopener noreferrer\">Add IPv6 nameservers in Dedicated Server and WHM<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Steps in WHM: Log into WHM and go to\u00a0Basic cPanel &amp; WHM Setup Change the Primary IP here with the option that says &#8220;The IP address (only one address) that will be used for setting up shared IP virtual hosts&#8220; Note: This might not actually be necessary. Log in to SSH, and do the following: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58],"tags":[186,187,188],"class_list":["post-3108","post","type-post","status-publish","format-standard","hentry","category-cpanel-control-panel","tag-cpanel-ip-change","tag-how-to-change-primary-ip-address","tag-whm-main-ip-change"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=3108"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3108\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=3108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=3108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=3108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}