SOLVED When you change port host accounts lose their ip

ribo

Well-Known Member
Oct 15, 2015
70
3
58
Greece
cPanel Access Level
Root Administrator
Hello, i installed varnish and i was saw an issue in changing ports. When i change port for non-ssl from 80 to another port everything is well. But when i want to return back to port 80 and using only apache then my host accounts that i have change ip except my first account.
For example i have 4 host accounts.
Account1 has 192.168.1.1 (which is shared ip and server's ip)
Account2 has 192.168.1.2 (which is dedicated ip)
Account3 has 192.168.1.3 (which is dedicated ip)
Account4 has 192.168.1.4 (which is dedicated ip)
So when i want to return back to port 80 from example port 8081 that i had before then Account2, Account3, Account4 lose their ip and they take the ip of Account1. So i must change their ip again. Can you please test it too? I use cpanel 66.22
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

I'm unable to reproduce this issue on a test system running cPanel version 66.0.22. Can you define the full step-by-step instructions you are taking when this happens?

Thank you.
 

ribo

Well-Known Member
Oct 15, 2015
70
3
58
Greece
cPanel Access Level
Root Administrator
i have 4 host accounts.
Account1 has 192.168.1.1 (main shared ip(share by root, nobody,account1,account2,account3) )
Account2 has 192.168.1.2 (dedicated ip)
Account3 has 192.168.1.3 (dedicated ip)
Account4 has 192.168.1.4 (dedicated ip)
I am going to Server Configuration-Tweak Settings-Apache non-SSL IP/port [?] and i put 0.0.0.0:8081
And everything is ok
Now i am going again to Server Configuration-Tweak Settings-Apache non-SSL IP/port [?] and i put 0.0.0.0:80 default
If i will go to Account Functions-Change Site’s IP Address i will see that have
Account1 has 192.168.1.1
Account2 has 192.168.1.1
Account3 has 192.168.1.1
Account4 has 192.168.1.1
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

I've now reproduced this issue and opened internal case CPANEL-15961 to report the behavior where changing the "Apache non-SSL IP/port" option in "WHM >> Tweak Settings" to a custom value (e.g. 0.0.0.0:8081), and then changing the option back to the default value, results in a modification of the dedicated IP address to the main shared IP address in the userdata files for any account assigned a dedicated IP. I'll monitor this case and update this thread with more information as it becomes available. In the meantime, the workaround is to manually update the IP address entries in any files within /var/cpanel/userdata/$username/ that contain the wrong IP address.

Thank you.
 

ribo

Well-Known Member
Oct 15, 2015
70
3
58
Greece
cPanel Access Level
Root Administrator
Can you also please test it and when you change port in Apache SSL port [?] for example if you change from 0.0.0.0:443 to 0.0.0.0:4443 and after you roll back from 0.0.0.0:4443 to 0.0.0.0:443 if the ips of account changing again? I am not sure about this but it may happens and for Apache SSL port [?] .
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Can you also please test it and when you change port in Apache SSL port [?] for example if you change from 0.0.0.0:443 to 0.0.0.0:4443 and after you roll back from 0.0.0.0:4443 to 0.0.0.0:443 if the ips of account changing again? I am not sure about this but it may happens and for Apache SSL port [?] .
Hello,

I tested that when opening the case, but it did not result in the same behavior as changing the non-SSL port.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hi @gigatech,

The priority on this case was recently upgraded, but there's no additional information to report at this time. I've linked this thread to the case, and will update this thread with new information as soon as it's available.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

To update, this is fixed in cPanel version 68.0.10:

Fixed case CPANEL-15961: Preserve dedicated IPs when updating userdata.

Thank you.