arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CyberPanel on NanoKVM's VPS - 2 Methods
#1
Rainbow 
Hello, P4V community!
You maybe thinking about the topic name that it's insane as only 20 ipv4 ports are open and cyberpanel's port is out of that range as well as it's port cannot be changed. We are going to figure this out below.
BTW you may also be thinking about this that from nowhere this thread came out in light. I am making this thread as yesterday I tackled this problem. I wanted to install cyberpanel on nanokvm's vps. I contacted their support but they said port cannot be changed as its integrated and thus if we forcefully change the port then its going to break. 

Solution (Of which I thinked of yesterday and discussed with cyberpanel admins): As we know NanoKVM doesn't allows port out of 7801-7820 to be accessible out of the local vps network. Now you may have got the idea that what I am going to do. I am going to run cyberpanel locally on the VPS.
I am going to install a GUI environment (if it's not installed) on the supported OS and then going to install cyberpanel which can be accessible on the local network with its port. [Method -1]
OR
Why not make the network of VPS and your PC same! [Method - 2] {VPN server}
And yes when I tried this out it worked out well.  Party

**Warning**: As @"Hidden Refuge" says so I am going to say that too here that this thread is not spoon feeding! Also, the commands given below were used on CentOS, so change them according to your server OS

Prerequisites:
  • You should be aware and should be used to CyberPanel
  • Used to VNC and GUI Installation
  • Used to Linux Commands
  • etc
Moving Forward:

Method - 1
First: Installation of a GUI. (We don't need to install any VNC server as we already have a VNC server on NanoKVM)

Install epel-release first,
sudo yum install epel-release


dnf --enablerepo=epel group -y install "Xfce" "base-x"

echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc

Now, Take care that you don't restart the VPS as after you restart you will stop the GUI session and again fallback to Command Line. (So, enter the below command when you are ready for it). And yes the below command should be run through VNC as then you will directly fall from Command to the GUI session.

startx

Now exit the VNC session.


Second: Installation of CyberPanel.
Fire up your ssh and then follow the procedures which is stated on the official site.
After installation, Note all the details of the users, passwords, ports in a txt file.


Third: Accessing the Panel.
Open the VNC session again. Now we have to open firefox. (Its not already installed. To install it simply type sudo apt install firefox or sudo yum install firefox for the respective OS systems)

After opening Firefox, enter this

https://localhost:8090


And your panel will load up!

Note: This pic was taken yesterday when I was experimenting all this! (OS: CentOS 8)
[Image: J9E3ZYF.png]

Now, add a site, etc! All thing will work flawlessly! 

Method - 2{RECOMMENDED}
Note: @Neoon said that VPN for fair use is allowed. Smile
So, you can use that until you make your server open to the world. Which will cause deletion of your server Dodgy
So, If you have any doubt still then ask @Neoon through mail support!
Credits to @chanalku91 ! Wink
I tried openvpn earlier but it didn't worked as I was messing with NAT IP and Public ipv4 address.

Step-1: Installing OpenVPN server link to repository: https://github.com/Nyr/openvpn-install

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

Step-2: When Installing choose the listening port between 7801 to 7820 and then you will get a .ovpn configuration file. Now you need that file on your local desktop. First, go the file and type 
cat <your_client_name>.ovpn

This will show you the text. Just copy and paste it on your local desktop with .ovpn extension!

Step-3: Install OpenVPN Connect from OpenVPN site and open openvpn connection with that .ovpn file

Step-4: Now comes the step to access cyberpanel. You just have to go to nanokvm dashboard. At starting you will see a IP 10.0.x.x or something like this. This is your local NAT IP which is used to communicate locally. So, just copy that IP and paste it in your local browser with 8090 port at the end
And
Voila! Cyberpanel will load up!


@"hidden refuge" I tried SSH tunneling and then I tried to access the cyberpanel with NAT IP but still It didn't worked. I tried this with mozilla firefox browser. I forgot the error which was displayed. Sad

Found any error? reply below! We all will help you out Smile
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#2
some Cyberpanel features I don't think will work on NAT VPS,
and btw have you tried to access Cyberpanel through the tunnel?
Terminal
Solo Developer
#3
(07-27-2020, 11:00 AM)chanalku91 Wrote: some Cyberpanel features I don't think will work on NAT VPS,
and btw have you tried to access Cyberpanel through the tunnel?

What do you mean by Tunnel? You meant something like: Accessing a webpage at some port which is between 7801-7820 which in turn will access the main cyberpanel page inside the VPS at its normal port? If This is what you are thinking then how can I implement it here?
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#4
@Amresh

You can use a SSH tunnel to access local ports on the server remotely from your computer. It's SSH port forwarding via SSH tunnel. So while you cannot access the CyberPanel port via the public IP of your VPS you can access it via SSH tunnel at the normal port with your local computer IP address.

References:
- https://www.akadia.com/services/ssh_putty.html
- https://linuxize.com/post/how-to-setup-ssh-tunneling/
- https://documentation.help/PuTTY/using-p...rding.html


Infact you can use a SSH session with tunneling enabled as a SOCKS5 proxy for applications and browsers.
[Image: zHHqO5Q.png]
#5
You could also dockerize CyberPanel and use a reserve proxy, such as nginx, to forward a port of your choice inside the allowed range into the desired port used by CyberPanel.

I did the same to set up portainer on NanoKVM.
Thanks to Post4VPS and Bladenodefor VPS 14
#6
@"hidden refuge" I tried ssh tunneling. I added a socks5 proxy in mozilla with localhost as ip and the port as the source port and I opened Ipleak to check my ip after tunneling and it displayed my server IP so tunneling was okay but still when I tried to access the cyberpanel on its port it didn't showed up! Sad

(07-28-2020, 08:03 AM)LightDestory Wrote: You could also dockerize CyberPanel and use a reserve proxy, such as nginx, to forward a port of your choice inside the allowed range into the desired port used by CyberPanel.

I did the same to set up portainer on NanoKVM.

I tried to forward ports by using Firewall.

sudo firewall-cmd --zone=external --add-masquerade

sudo firewall-cmd --zone=external --add-forward-port=port=8090:proto=tcp:toport=7801:toaddr=MY_IP_ADDRESS


but still it says this 

[Image: image.png]

BTW I found this..... I haven't applied this yet..... I wanted to know the suggestions from you all first.....
[Image: image.png]
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#7
I think firewall can't perform the job of a reverse proxy. Firewall doesn't care about the content of the HTTP request, which is needed by the portal.

I suggest you to look at nginx and its reverse proxy features with the directive: proxy_pass.
Look at thid doc for reference:
https://docs.nginx.com/nginx/admin-guide...rse-proxy/
Thanks to Post4VPS and Bladenodefor VPS 14
#8
You don't actually need to change the port .. as CyberPanel creator clearly states the port 8090 is hard-coded into the backend and LiteSpeed server so it'll be extremely challenging to find and replace each instance of the port with the one you want.

There's a workaround though. Instead of changing port, make it available on a plan subdomain so that you can access it over the internet. Smile https://blog.cyberpanel.net/2018/12/25/h...yberpanel/
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#9
(07-28-2020, 09:46 AM)sohamb03 Wrote: You don't actually need to change the port .. as CyberPanel creator clearly states the port 8090 is hard-coded into the backend and LiteSpeed server so it'll be extremely challenging to find and replace each instance of the port with the one you want.

There's a workaround though. Instead of changing port, make it available on a plan subdomain so that you can access it over the internet. Smile https://blog.cyberpanel.net/2018/12/25/h...yberpanel/

I did all the steps but still I am not able to access it! Its now showing me 503 Service Unavailable. Have u faced this error? I did exactly the same thing which the blog tutorial said.

[Image: image.png]

Thnx @chanalku91 for that OpenVPN idea. It worked! I was messing with the NAT Private IP and Public Ipv4 addresses ....
Gr88 thnx!!!!!!!!!!!!!!!!!!
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#10
(07-28-2020, 11:03 AM)Amresh Wrote: I did all the steps but still I am not able to access it! Its now showing me 503 Service Unavailable. Have u faced this error? I did exactly the same thing which the blog tutorial said.

[Image: image.png]

Thnx @chanalku91 for that OpenVPN idea. It worked! I was messing with the NAT Private IP and Public Ipv4 addresses ....
Gr88 thnx!!!!!!!!!!!!!!!!!!

This problem should have been resolved, but one question popped into my head!
Do I need to try comparing SSH Tunnel with Open VPN?
because I have not tried using SSH as a VPN connection!
Terminal
Solo Developer
Pages (2):


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
1,545
05-09-2021, 04:39 PM
Last Post: deanhills
5,667
12-17-2020, 05:45 PM
Last Post: fitkoh
9,995
08-23-2017, 09:14 PM
Last Post: perry

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting