2

I 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:

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):

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.

  • 1
    is the network service running? service network start – Yousef Al-Hadhrami Sep 26 '18 at 22:52
  • 255.255.255.255 netmask is to talk to your own device – Yousef Al-Hadhrami Sep 26 '18 at 22:53
  • Yup, I tried to run it again just now and it said OK. I run service network status and I get Configured Devices: lo eth0 Currently active devices: lo eth0 – Jon Sep 26 '18 at 22:54
  • @YousefAl-Hadhrami how do I change my netmask? – Jon Sep 26 '18 at 22:57
  • 1
    Please would you update your question to make it clear whether it's the Proxmox server that has these configurations or the CentOS VM. You've also mentioned a VPS; what's that? Proxmox? – roaima Oct 7 '18 at 23:06
2
+100

You have PREFIX="32", which is the same as NETMASK=255.255.255.255. Get rid of that, and set a netmask that will allow you to reach your gateway address. You should use either PREFIX=... or NETMASK=..., but not both.

For reference, PREFIX="24" and NETMASK="255.255.255.0" are equivalent.

  • PREFIX="24" didn't fix the problem. I removed the NETMASK line too – Jon Oct 12 '18 at 16:24
  • Is your gateway address contained within the 198.50.192.0/24 network, or does it have some other prefix? Normally, the gateway address for that network would be something like 198.50.192.1. If your intended gateway address is not in that same network, then you're mask/prefix is still not right. Unfortunately, without knowing the details of your network, all I we can do is guess as to what the correct values should be. – guzzijason Oct 12 '18 at 23:31
  • Gateway address is 150.69.254.254 – Jon Oct 13 '18 at 18:36
  • 1
    Changing gateway from 150.69.254.254 to 190.50.192.254 fixed it. The first one is the my main OVH IP but with .254 as the end (Which is what they say to set it to), the second one is the IP of that VM but with .254 as the end. Your prefix comment helped me track down the issue, so I'm rewarding you the bounty. Thanks – Jon Oct 13 '18 at 20:21
0

the issue is routing.

check ip route check eth0 is default root properly.

ideally it should be automatically configured by network manger.

exaple of ip route

ip route

default via 192.168.1.1 dev eth0 metric 100

192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.106

  • ip route: 169.254.0.0/16 dev eth0 scope link metric 1002 (New line) 198.50.192.0/24 dev eth0 proto kernel scope link src 198.50.192.xxx (Actual IP) – Jon Oct 12 '18 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.