Network connection problem with Alama 8/cPanel fresh installation

I have set the new machine with AlmaLinux 8.9 and cPanel. I set the network NICs manually for 2 IPs for this server at first and then it worked fine, so I also installed cPanel and all was OK, but after a couple of days the network went down without any reason. I fiddled with manual settings without any positive results and then activated NetworkManager after reading some docs and forum here. Nothing helps. I am not an IT guy, so I am stuck now, as I am still offline. Can anybody help and direct me on what to do to please? I have 4 port NIC on Dell 620 with 2 static IPs for eno1 and eno3. I am attaching the screen shots of my connections. Thanks for any input…

  • It’s not NM_MANAGED=yes , it’s NM_CONTROLLED=yes in network-scripts.
  • If DHCP is enabled on the network, directly try using dhclient -v command which will try DHCP on network and will most likely make your network up temp unless you make a permanent network configuration.
  • You are using NETMASK and PREFIX which do not correspond to same subnet mask or prefix length. If you have a /29, then either use NETMASK=255.255.255.248 or PREFIX=29 but not both at the same time.

Hi Ankesh, thanks for looking into it for me… =). I changed MANAGED to CONTROLLED and left PREFIX empty. Then I restarted MetworkManager and rebooted the machine, but still network is off. I cannot use DHCP for this machine, as it needs static IP to serve websites to my clients. I might use the command you are suggesting to see if I can fix the settings. What will be a command to undo the DHCP? I am attaching the latest screenshots, please take a look at them and see if you can find another way to get it working Ankesh? I appreciate your help very much…

That is not quite the whole truth.

On one side, the users tend to write a name, not IP address, into their browser. As long as their system resolves the name to the current IP address of your server, they can connect. To get that set up is probably dynamic DNS or something.

More importantly, the DHCP can give a predictable and persistent IP address to a client. Most DHCP servers can be configured to give same address to MAC address (of the client), rather than next free address from a pool. (DHCP can also be set to not give any address to unknown clients.) The point of DHCP is to centrally give correct config to members of the subnet. A machine is not “on net” – net “has members”.


If you want to use NetworkManager, then use NetworkManager. Creating/editing files by hand is not making use of NM tools. Both nmcli and nmtui work from command-line. Look at man nmcli-examples and man nmcli.


The ifconfig got an improved alternative in iproute2 package over two decades ago. See ip li, ip ad, ip ro, and plain nmcli.


You have two interfaces up and they are on the same subnet. You most likely do not want that.


The cPanel may have its own way of setting things up. If you want to use cPanel, then you must cPanel and no other way. (I don’t actually know what cPanel has/requires – no machine of mine has any *panel.)

Hi… Thanks for the answer… This 2 IPs resolve to registered ns1 and ns2. CPanel is installed on top of almalinux os and controls all aspects of a server. I have it working on another machine with older Linux version. They (cPanel support) can help me if they can login to the new machine, but right now I cannot figure this issue out. I read just about everything about NM but I have no idea how to resolve this problem here. I do not know where to start. Would you be able to direct me step by step on what I should do to get this machine online?

BTW. It has to be IP 72.139.123.213

  • DHCP does not mean that you don’t get a static IP. It simply means that you’ll get the same persistent IP which might have been already connected to the server if under the lease time. DHCP will still work with cPanel and there will be no problems.
  • Remove PREFIX line fully, it’s not required. Are you sure if you have a /24 prefix or a /29 because NETMASK will change accordingly?
  • Running dhclient seems the easiest option as it would bring your server uptime back as well as you can also see where your config went wrong and fix it.

    The server mentioned in this sandbox is a cPanel server with wrong config which is configured using DHCP. You can see that 2 of the records are wrong.

Another thing you can look out for is route -n to see if you are getting the proper routes for interface or not.

Hi… I removed the prefix line altogether. Not sure if PREFIX is the same as SUBNET? In my case it is 255.255.255.248. Is that ok? I tried to run the command: dhclient -v but I get “command not fund”.

Hi Ankesh, I have run command: route -n and I attach the resulting screenshot. It appears it is not right, is it? What do you think? What should I do to fix it, if so?

Those routes also look good enough to me. dhcpclient is missing on your server, and you can’'t install it as well as your network is down. Have you checked if the firewall rules are correct seeing that NetworkManager is up? Another thing is that I am unsure what kind of network setup your provider have, so take a backup of the ifcfg config files and try the following one(/ is for changing the values if it does not work):

TYPE=Ethernet
BOOTPROTO=dhcp/none/static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
NAME=(device name)
DEVICE=(device name)
ONBOOT=yes
IPADDR=(ipaddr)
PREFIX=29
GATEWAY=(gateway ip)
NM_CONTROLLED=yes

Do this ip route flush table all and then try restarting NetworkManager

Also, what’s the output of:

ip route get 8.8.8.8

I got this:

Yep, looks like no routing problems.

Thanks… I will try that tonight.

Those routes do not look sane. Now you have three interfaces.

  • The eno2 is member of 72.139.123.0/24
  • The eno1 and eno3 are both member of 72.139.123.208/28
  • The 72.139.123.208/28 is a subrange of 72.139.123.0/24

You would get a bit more detail with command: ip ro


If network does not work now, then my suggestion is to remove all current connections
and then create one connection. Just one, with one IPv4 address.