I am struggling to make something similar to work.
Here is my current cluster's configuration:
1 CP - Hetzner VPS, used only for the panel.
3 VPS - Each with its own DB and Application roles installed. Different VPS providers in EU.
I want to add backup server, which is behind a NAT. The problem I have is that the public IP is dynamic and changes from time to time. I have a private network between the servers through Tailscale.
From the website of Tailscale:
Tailscale makes creating software-defined networks easy: securely connecting users, services, and devices.
With Tailscale is easy to create private mesh encrypted networks over internet.
I tried 3 different scenarios to have my backup server working through the Tailscale's private network.
Scenarios:
Installed Tailscale on both the CP and the NATed backup server. Port 50000 opened as per the documentation here
https://enhance.com/docs/troubleshooting/failed-to-install-database-role.html
. Also the other ports from the documentation. All works good, until the public IP changes. Then the backup server's information on the panel's dashboard is not visible and the server is ...not responsive from the GUI.
Installed tailscale on both the CP and the NATed backup server. This time I followed @Adam suggestion from this post https://community.enhance.com/d/990-internal-ip-for-backup-role/2
. Before run the installation script on the backup server, I edited the /etc/hosts of the backup server as follow:
100.69.168.42 panel.domain.com
This is the internal IP address of tailscale. I also have been warned that the system could have malfunctions. The installation went ok. The server showed in the Panel's GUI but somehow the information showing (the disk size, the CPU load, RAM etc.) was from the panel's server itself. This was very strange.
Same steps as the 2nd, but this time i edited /etc/hosts of the Control Panel's server as follow:
100.69.168.42 panel.domain.com
After that, I run the installation script on the backup server and nothing really happened. The server showed up in the Control Panel's GUI but was "red dot" and no information was visible.
I've tried the 1st scenario with another open source software (Zerotier) which is very similar to Tailscale. It also make a private network through internet, so no port is needed to be opened. The result was the same.
Questions:
- What am I doing wrong? How can I achieve to have backup server behind NAT, using my private network?
- @Adam, do you think Tailscale, Zerotier, Netbird or other similar to them is the way to go to make it closer to have private networks between servers in a cluster, especially when they are in different data centers?
- When the public IP of the backup server changes, is there a config file to edit in order to make it work again? I tried to change it in the server's settings under "Server IP address" but without success.
- Is there a way to make use of DDNS to update my new public IP somehow?
- To all the community who are familiar with Tailscale, Zerotier, Netbird etc. Do you think it is a good feature request to have integration with either of the above softwares to have internal P2P, mesh encrypted communication between servers in different providers/data centers within a cluster (fast forward why not in future also between different clusters)?
Thank you @Adam for your time and the good work with the panel. Thank you guys for the good community you created here. I already feel part of it by reading your experiences and struggles you faced!
Regards,
Simeon