IP (IPv4) addresses added not working

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Hi,

I got a cPanel VPS through Vultr and got an extra IP (IPv4), however the IP is not working.

I have done the following:
  • Added the IP through WHM, while setting up WHM.
  • Installed CSF
  • Changed the SSH port
  • Changed it from DHPC to Static.
  • Rebooted.

So then I tried:
  • Pinging the IP from my computer - Didn't work
  • Pinging the IP from the server via SSH - Did work.
  • Deleted and re-added the IP - Didn't work
  • Ordered another IP from Vultr and added it - Didn't resolve, same as the other one.

The 2 extra IPs have the Netmask of 255.255.252.0 and 255.255.254.0
But I set it to 255.255.255.0 as that is what the cPanel Docs said.

[[email protected] ~]# service ipaliases restart
UnRouting 45.xx.xx.84 [ OK ]
Shutting down eth0:cp2 [ OK ]
UnRouting 45.xx.xxx.108 [ OK ]
Shutting down eth0:cp1 [ OK ]
Bringing up eth0:cp1 [ OK ]
Routing 45.xx.xxx.108 [ OK ]
Bringing up eth0:cp2 [ OK ]
Routing 45.xx.xx.84 [ OK ]
[[email protected] ~]#

[[email protected] ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 56:xx:xx:xx:xx:36
inet addr:45.xx.xx.173 Bcast:45.xx.xx.255 Mask:255.255.252.0
inet6 addr: fe80::xxxx:xx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1874 errors:0 dropped:0 overruns:0 frame:0
TX packets:1543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:215476 (210.4 KiB) TX bytes:320589 (313.0 KiB)

eth0:cp1 Link encap:Ethernet HWaddr 56:xx:xx:xx:xx:36
inet addr:45.xx.xxx.108 Bcast:45.xx.xxx.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth0:cp2 Link encap:Ethernet HWaddr 56:xx:xx:xx:xx:36
inet addr:45.xx.xx.84 Bcast:45.xx.xx.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:695 errors:0 dropped:0 overruns:0 frame:0
TX packets:695 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:99544 (97.2 KiB) TX bytes:99544 (97.2 KiB)

[[email protected] ~]#

[[email protected] ~]# nano /etc/resolv.conf
nameserver 108.61.10.10
nameserver 8.8.8.8
nameserver 8.8.4.4


[[email protected] network-scripts]# nano ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
ONBOOT="yes"
TYPE="Ethernet"
NM_CONTROLLED="no"
IPADDR=45.xx.xx.173
NETMASK=255.255.252.0
GATEWAY=45.xx.xx.1
DNS1=108.61.10.10
IPV6_AUTOCONF=yes
IPV6INIT=yes
#DNS2=2001:xxx:xxx:xxxx::6

Vultr has also confirmed the IPs are routing ok
 
Last edited:

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Hi,

I have got them working, now I completely reinstalled the VPS, then I changed eth0 to static from DHCP.
Went through the basic setup of WHM, then after added the IPs.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
Hello,

I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.