The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I change main IP address using ssh

Discussion in 'General Discussion' started by Stuart Brown, Apr 10, 2017.

Tags:
  1. Stuart Brown

    Stuart Brown Registered

    Joined:
    Apr 10, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Stupid me, I changed the main IP address of my VPS in WHM.

    Now when I login to WHM I get the CPanel License Activation page because the new IP Address does not have a CPanel License.

    Is there any way of using SSH to login and change a config file somewhere to change the IP Address back to what it was please?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,602
    Likes Received:
    51
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    what does
    ifconfig say

    why can you just reset your main IP in your vps control panel (or is that not allowed)

    what does your your ip start up's look like in
    /etc/sysconfig/network-scripts
     
  3. Stuart Brown

    Stuart Brown Registered

    Joined:
    Apr 10, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    I can't change the IP address in the control panel because I can't login into cpanel! There's no way to do this from my hosting companies website either.

    I have five files that have a change date of today in /etc/sysconfig/network-scripts:
    ifcfg-venet0
    ifcfg-venet0:0
    ifcfg-venet0:1
    ifcfg-venet0:2
    ifcfg-venet0:3

    They relate to the four IP addresses I am using.

    ifconfig doesn't give me any more information than what's in those files
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,186
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The cPanel license is IP-based. You can see which IP address your server is making outgoing connections from with one of these commands:

    Code:
    curl -L http://cpanel.net/showip.cgi
    lynx -dump http://cpanel.net/showip.cgi
    If you need to change the IP address used for outgoing connections, then you'd have to make manual modifications to the network scripts on your system. Here's a thread where this is discussed:

    Changing the main server IP and sites on server will not load

    However, if you are unfamiliar with these files, I recommend reaching out to your provider for help making the network configuration changes.

    Thank you.
     
Loading...

Share This Page