usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.53k stars 589 forks source link

[BUG] IPv6 connectivity issues with installer #1031

Open Bt6K opened 1 year ago

Bt6K commented 1 year ago

If a server has an IPv6 address assigned, but the IPv6 connectivity doesn't work, the CyberPanel installer will hang for around 5-10 minutes before proceeding:

root@test:~# sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)

-bash: curl: command not found

Redirecting output to 'wget-log'.

Instead, CyberPanel should be checking for valid IPv6 connectivity using something like ping6 google.com, and if it fails to connect, it should fallback to IPv4.

Example of the server trying to use IPv6 as standard:

root@test:~# ping google.com
PING google.com(ams17s10-in-x0e.1e100.net (2a00:1450:400e:801::200e)) 56 data bytes
^C
--- google.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms

root@test:~#

Meanwhile, IPv4 works fine:

root@test:~# ping -4 google.com
PING  (142.250.179.142) 56(84) bytes of data.
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=1 ttl=112 time=150 ms
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=2 ttl=112 time=149 ms
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=3 ttl=112 time=149 ms
^C
---  ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 148.824/149.211/149.968/0.535 ms
root@test:~#
qtwrk commented 1 year ago

well , but the issue is , at that step , none of our script is executed yet , so how to check ?

jcn50 commented 1 year ago

@Bt6K this has nothing to do with the install script but the (pre)configuration of your OS. If you do not have IPv6 connectivity you shouldn't have an IPv6 assigned in your OS in the first place. Just run these commands prior to installation and you should be fine:

echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6=1" >> /etc/sysctl.conf
sysctl -p
yum install -y curl