Clouseau

Active Member
Jan 17, 2015
41
3
58
cPanel Access Level
Root Administrator
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.
 
  • Like
Reactions: jfreak53

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,265
1,297
363
Houston

Clouseau

Active Member
Jan 17, 2015
41
3
58
cPanel Access Level
Root Administrator
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.
 

jfreak53

Well-Known Member
Feb 29, 2008
61
0
56
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.
 

jfreak53

Well-Known Member
Feb 29, 2008
61
0
56
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
Code:
/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:

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

Code:
ifup eno2
 

Clouseau

Active Member
Jan 17, 2015
41
3
58
cPanel Access Level
Root Administrator
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.
 

jfreak53

Well-Known Member
Feb 29, 2008
61
0
56
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.