cPanel with multiple NIC's
Hello,
I have read that cPanel doesn't support multiple NIC and puts additional IP's as ip alias of primary interface (usually eth0).
I have a server with two interfaces inside my VM, I have configured policy routing and I have working network on both interfaces. Due to a how network has been designed inside Datacentar where dedicated server is, I cannot bind second IP to primary interface (eth0:0 or eth0:cp1), I can only add interface with seperate MAC and give it an IP.
So my question is: can I have problems in the future, when cPanel uprades for example? For now it works:
Under "Show or Delete Current IP Addresses" section in WHM I can see:
eth0 interface as IP1 Main/shared IP for: username1, nobody, and root
eth1 interface as IP2 Dedicated to: username2
All users will use IP1, few will use IP2. Possibility is that I will add eth2 interface in future for third IP.
-
Hello, There's no restriction on NIC's but we do prefer they are added through ipaliases - essentially as long as the network works it should be fine. The documentation here explains how this works: Add a New IP Address - Version 84 Documentation - cPanel Documentation 0 -
Hi, ok tnx. I know how cPanel adds additional IP's but I found info that is not recommended or supported. Due to specific nature of DC network, I cannot acomplish that with cPanel but cPanel sees additional eth1 interface without problem (don't need to add IP or rebuild the pool...). Cool. 0 -
I have a server with two interfaces inside my VM, I have configured policy routing and I have working network on both interfaces. Due to a how network has been designed inside Datacentar where dedicated server is, I cannot bind second IP to primary interface (eth0:0 or eth0:cp1), I can only add interface with seperate MAC and give it an IP.
How did you get this to work?? I cannot get a secondary NIC with a different IP set to work at all!! I've added static to eno2 interface via `/etc/sysconfig/network-scripts/ifcfg-eno2` but when I reboot or do `ifup` it breaks the other NIC and no internet until I remove it and reboot.0 -
Check out source routing 0 -
To anyone looking to do this in the future, found out it was quite simple, I must of been doing something wrong. Find your network interface in /etc/sysconfig/network-scripts/
. For me it was ifcfg-eno2. Edit this file, below are the important parts you need to either add or edit:BOOTPROTO=none DEFROUTE=no ONBOOT=yes IPADDR=10.1.5.251 PREFIX=24 GATEWAY=10.1.5.1
Very important, change DEFROUTE to NO, if not you will loose internet. Once done bring the interface up:ifup eno2
0 -
That will work but it will not be good for clients that are hosted on eth1. Everything that goes outside will be like it is on eth0 which doesn't resolve to DNS records pointing to eth1 IP. 0 -
That will work but it will not be good for clients that are hosted on eth1. Everything that goes outside will be like it is on eth0 which doesn't resolve to DNS records pointing to eth1 IP.
This is true, but in our case we don't need clients doing anything with IP on the secondary NIC, it's only for communication between servers locally. So no need for accounts to use it.0 -
To anyone looking to do this in the future, found out it was quite simple, I must of been doing something wrong. Find your network interface in
/etc/sysconfig/network-scripts/
. For me it was ifcfg-eno2. Edit this file, below are the important parts you need to either add or edit:BOOTPROTO=none DEFROUTE=no ONBOOT=yes IPADDR=10.1.5.251 PREFIX=24 GATEWAY=10.1.5.1
Very important, change DEFROUTE to NO, if not you will loose internet. Once done bring the interface up:ifup eno2
Hi! Can you confirm that this exact configuration works now with cPanel 110.0.11? I need a secondary IP that is on diferent subnet to configure the IP through emails will sent with exim. Regards.0
Please sign in to leave a comment.
Comments
8 comments