SOLVED Network is unreachable in CentOS 7 after cPanel install + restart

Sykoi

Member
Oct 19, 2004
24
0
151
I followed the instructions here and then here to disable the network manager, I installed cPanel and got it working fine. I added extra IP addresses then restarted the server. Now when I try to ping 8.8.8.8 on the server through proxmox's console I get 'Network is unreachable', and I'm unable to connect to the server remotely.

My ifcfg-eth0 file:
Code:
    TYPE="Ethernet"
    PROXY_METHOD="none"
    BROWSER_ONLY="no"
    BOOTPROTO="none"
    DEFROUTE="yes"
    IPV4_FAILURE_FATAL="no"
    NAME="eth0"
    UUID=...
    DEVICE="eth0"
    ONBOOT="yes"
    HWADDR=My Virtual Mac from OVH
    IPADDR=IP assigned to VPS
    PREFIX="32"
    GATEWAY=Correct gateway for my OVH server
    DNS1=8.8.8.8
    DNS2=8.8.4.4
When I run ifconfig -a (Shortening to relevant parts):
Code:
    eth0: ...
    inet IPOfVPS netmask 255.255.255.255 broadcast: IPOfVPS
   
    eth0cp1-4:
    inet IPs netmask 255.255.255.0 broadcast: IP but with .255 as the last number
I had to retype everything manually since I can't copy/paste from proxmox's console, but the relevant information should be there. If anymore information is needed, let me know in a comment.
To be clear: Networking was working until I restarted, which I only did after finishing the cPanel install and adding additional IPs. I'm also using the latest version of everything - I just installed cPanel last night.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello @Sykoi,

Can you open a support ticket so we can take a closer look at your system and determine if there's anything in the cPanel & WHM configuration that's leading to the issue you have reported? You can post the ticket number here and we will link this thread to the ticket.

Thank you.
 

Sykoi

Member
Oct 19, 2004
24
0
151
After testing, I've figured out the problem exists regardless of a cPanel install - it's purely the turning off NetworkManager that does it.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
After testing, I've figured out the problem exists regardless of a cPanel install - it's purely the turning off NetworkManager that does it.
Hi @Sykoi,

I appreciate the additional information. I'd like to reproduce this behavior so we can add a note to our Linux Containers document in order to inform ProxMox users about this caveat. Can you confirm which specific OS is installed on both the host and the guest?

Thank you.
 

Sykoi

Member
Oct 19, 2004
24
0
151
Here's the steps to reproduce it:

I installed CentOS 7 using the minimal ISO on my Proxmox VPS (Hosted on SoYouStart / OVH - noted since they have weird networking policies), configured my ifcfg-eth0 file. After that I was able to use yum update, ping 8.8.8.8, connect via SSH, etc.
After following this guide to disable network manager and restarting - I'm no longer able to do anything network related, including pinging 8.8.8.8 (I get 'connect: Network is unreachable')
My ifcfg-eth0:
Code:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO="none"
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=My UUID
DEVICE=eth0
ONBOOT="yes"
HWADDR=My VPS's virtual mac
IPADDR=XXX.XXX.192.145
PREFIX=24
GATEWAY=Main IP on my proxmox box gateway IP (XXX.XXX.XXX.254)
DNS1=8.8.8.8
DNS2=8.8.4.4
IPV6_PRIVACY=no
ARPCHECK="no"
NETMASK=255.255.255.255

Host:
cat /etc/os-release
Code:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Guest:
cat /etc/os-release
Code:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
@cPanelMichael can you keep me updated on the issue?
 
Last edited by a moderator:

Fernando V

Registered
Sep 28, 2018
3
0
1
Catalonia
cPanel Access Level
Root Administrator
I did both
Do you restart the network afterwards so that the changes are applied?

Code:
# sudo systemctl restart network.service
Put the results here, removing sensitive data.

Verify new IP settings:

Code:
# ip addr
Code:
# ip a s eth0
Verify new routing settings:

Code:
# ip r
Verify DNS servers settings:

Code:
# cat /etc/resolv.conf
Verify the internet connectivity:

Code:
# ping -c 3 cpanel.net
More info:

OVH - Proxmox VE

Regards.


 
Last edited:

Sykoi

Member
Oct 19, 2004
24
0
151
ip addr:
(Ignoring lo)
Code:
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP) mtu 1500 qdisc pfifo_fast state UP group default glen 1000
link/ether virtualmacfromovh brd ff:ff:ff:ff:ff:ff
inet VPS IP/24 brd first 3 numbers of vps ip then .255 scope global eth0
valid_lft forever preferred_lft forever
ip r
Code:
169.254.0.0/16 dev eth0 scope link metric 1002
first 3 numbers of vps ip then .0/24 dev eth0 proto kernel scope link src vpsip
cat /etc/resolv.conf
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
ping -c 3 cpanel.net
Code:
ping: cpanel.net: Name or service not known
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
I installed CentOS 7 using the minimal ISO on my Proxmox VPS (Hosted on SoYouStart / OVH - noted since they have weird networking policies), configured my ifcfg-eth0 file. After that I was able to use yum update, ping 8.8.8.8, connect via SSH, etc.
After following this guide to disable network manager and restarting - I'm no longer able to do anything network related, including pinging 8.8.8.8 (I get 'connect: Network is unreachable')
Hello @Sykoi,

I recommend contacting your provider to verify the network settings on your server are configured properly. In particular, have them ensure the gateway and subnet mask are setup correctly to their requirements.

Thank you.
 

Suertzz

Registered
May 16, 2019
1
0
1
France
cPanel Access Level
Root Administrator
Hi @Sykoi,

I have exactly the same problem as you, after disabling Network manager, install cpanel and restart the server I lost internet (installation under proxmox with quemu, ip failover OVH, Centos 7). I searched everywhere and found nothing conclusive, did you find a solution please ?

Thank in advance :(
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
I have exactly the same problem as you, after disabling Network manager, install cpanel and restart the server I lost internet (installation under proxmox with quemu, ip failover OVH, Centos 7). I searched everywhere and found nothing conclusive, did you find a solution please ?
Hello @Suertzz,

Can you open a support ticket so we can take a closer look at your system? You can post the ticket number here and we will link this thread to the ticket.

Thank you.
 

cmdrspock

Registered
May 30, 2015
2
7
3
Goes, Netherlands
cPanel Access Level
Root Administrator
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
x.x.x.x dev eth0
default via x.x.x.x dev eth0
 

Spinetta

Registered
Feb 9, 2012
3
1
53
cPanel Access Level
Root Administrator
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
I'm not even going to apologize for necroing this thread because I've been googling my butt off for 4 days & this is the ONLY solution out of about 50 supposed working solutions that works with CentOS7. I had to create the route-eth0 file manually, added the lines as indicated, configured the ifcfg-eth0 according to OVH's Wiki and voila, it works! Thank you SO much. I have literally been at this for 4 days, 12 hours a day & there is NOTHING but this thread out there on how to get cPanel to work with OVH Failover IPs that actually works but this.

In our case we're running a SoYouStart Dedicated Server with Windows 2016 Datacenter as the host & CentOS7 w/ cPanel in VirutalBox. Make sure you also set the VM to use the Virtual MAC you have to manually generate through the OVH / SYS control panel.

Never been so happy to have someone necro a thread but I really can't thank you enough. We're up & running with 24 hours to spare before I lose this contract. You just saved my job.
 
  • Like
Reactions: cPanelLauren

jndawson

Well-Known Member
Aug 27, 2014
303
32
78
Western US
cPanel Access Level
DataCenter Provider
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
I have been trying to figure out what went wrong after rebooting to configure quotas after installation, and this is the only thing that has worked.

So, thanks!
 

mshannaq

Member
Jan 16, 2010
6
0
51
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
Thank you alot

this help me to fix the problem while installing Cpanel on Proxmox VM.
 

mshannaq

Member
Jan 16, 2010
6
0
51
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
any one know how to solve this on Centos8

I have the same problem on Centos8 and creating a new file etc/sysconfig/network-scripts/route-eth0 does not solve the problem
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,810
895
313
cPanel Access Level
Root Administrator
@mshannaq - our documentation at How to Disable Network Manager | cPanel & WHM Documentation says this:

"On systems that run CentOS 8 or AlmaLinux 8, the cPanel & WHM installer will automatically disable the Network Manager service and enable the network.service service."

If you're not seeing that working properly can you please open a ticket with our team so we can check that configuration on your server?
 

rg49

Registered
Apr 12, 2021
2
1
3
France
cPanel Access Level
Root Administrator
Hate to necro a thread but this was the only thing that came up on Google while I was figuring this one out for myself.

Turns out, if you disable network manager the OS has no idea what to do with your gateway information - and this is essential for failover IPs to work on OVH without a vRack.

To fix it simply - open /etc/sysconfig/network-scripts/route-eth0 (replacing eth0 with your network device).

In that file, put (replacing x.x.x.x with your gateway IP and eth0 with your network device):
Genius! Problem still here 2 years later. After cpanel install, I lost the network and nobody at support was able to help me... Appears they didn't hear about this for proxmox users (I'm a scaleway customer, not OVH).
 
  • Like
Reactions: mshannaq