Page 1 of 1

Network is unreachable in CentOS 7 after disabling Network Manager for cPanel + restart

Posted: 2021/02/05 04:13:27
by Daniel352
have a server from OVH (SoYouStart technically), it's running Proxmox and the VM is running CentOS.

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: Select all

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: Select all

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.

FIX: OVH/SYS gives bad advice for using the 'network' service - don't set your gateway to your main IP with .254 as the last number, set it to that VM's IP with .254 as the last number.

Re: Network is unreachable in CentOS 7 after disabling Network Manager for cPanel + restart

Posted: 2021/02/05 15:40:57
by TrevorH
You almost certainly need to ask OVH since their network setup is about the most non-standard that it's possible to get. However, a quick look and I see you have PREFIX=32 which translates to a netmask of 255.255.255.255 which means you cannot reach any other ip address from your host at all. That does not look right (but it's OVH!).