Pterodactyl Panel proxied through Cloudflare

I'm trying to Proxy Pterodactyl Panel through Cloudflare and I have created Origin Certificates from CF and configured them into my Panel. Now when I try to go to my panel it "stalls" and just doesn't load anything, like in the picture. Btw I've following this tutorial https://www.youtube.com/watch?v=yOG45TLWNu0&t=436s.
No description
148 Replies
Chaika
Chaikaā€¢4mo ago
ctrl+shift+i or right click -> inspect and look at the console/network tabs and see which requests are failing I haven't played around to much with pterodactyl but iirc it uses "Wings" on the host server for status/actual server info which its probably trying to send requests to and failing
Toffi
Toffiā€¢4mo ago
Ah yes request I forgot that, it's 504
Object { message: "Request failed with status code 504", name: "AxiosError", code: "ERR_BAD_RESPONSE", config: {ā€¦}, request: XMLHttpRequest, response: {ā€¦}, stack: "" }
Object { message: "Request failed with status code 504", name: "AxiosError", code: "ERR_BAD_RESPONSE", config: {ā€¦}, request: XMLHttpRequest, response: {ā€¦}, stack: "" }
Chaika
Chaikaā€¢4mo ago
that's the request for server info? Any more info on it? What's the request path and such?
Toffi
Toffiā€¢4mo ago
there's also this
No description
Chaika
Chaikaā€¢4mo ago
That error looks like your panel is trying to reach out to wings/the actual server via Axios and failing, I would check config/logs
Toffi
Toffiā€¢4mo ago
No description
Toffi
Toffiā€¢4mo ago
Oh, I think I haven't opened daemon port 8443 Let me check Wasn't, but now is It's still in same condition however I rebooted also
Chaika
Chaikaā€¢4mo ago
Did the error change at all? For me that gives an instant 523 now Err maybe you were rebooting it when i was testing, seems to back to timeout now
Toffi
Toffiā€¢4mo ago
nope yeah ig
ubuntu@oracle:~$ tail -n 1000 /var/www/pterodactyl/storage/logs/laravel-$(date +%F).log | grep "\[$(date +%Y)"
[2024-02-06 18:41:35] production.WARNING: GuzzleHttp\Exception\ServerException: Server error: `GET https://panel.1stclub.xyz:8443/api/servers/79d87146-e5a7-4084-be41-d0272755ce71` resulted in a `523 ` response:
ubuntu@oracle:~$ tail -n 1000 /var/www/pterodactyl/storage/logs/laravel-$(date +%F).log | grep "\[$(date +%Y)"
[2024-02-06 18:41:35] production.WARNING: GuzzleHttp\Exception\ServerException: Server error: `GET https://panel.1stclub.xyz:8443/api/servers/79d87146-e5a7-4084-be41-d0272755ce71` resulted in a `523 ` response:
here are the logs any idea? by that
Chaika
Chaikaā€¢4mo ago
So my understanding is Wings is on 8443 but it's unreachable. Panel is on 443 and works fine. Check Wings config/anything blocking it. On the server itself can you reach that port? curl https://127.0.0.1:8443 -k -vvv
Toffi
Toffiā€¢4mo ago
Yep connection refuse for 8443
Chaika
Chaikaā€¢4mo ago
I guess by default it's on 8080 and you need to change it? https://pterodactyl.io/wings/1.0/configuration.html#enabling-cloudflare-proxy
Additional Configuration | Pterodactyl
Pterodactyl is an open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
Toffi
Toffiā€¢4mo ago
Yes, but if I want to use proxy I need to use 8443
Chaika
Chaikaā€¢4mo ago
Right, so I'm guessing you didn't change it or something went wrong in that changing process
Toffi
Toffiā€¢4mo ago
I did change it on conf
Toffi
Toffiā€¢4mo ago
No description
Toffi
Toffiā€¢4mo ago
Your panel is not up-to-date! The latest version is 1.11.5 and you are currently running version 1.11.3.
Your panel is not up-to-date! The latest version is 1.11.5 and you are currently running version 1.11.3.
Could this also affect this? Tho I have updated panel twice without single error, but it stays 'outdated'...
debargha
debarghaā€¢4mo ago
no
Toffi
Toffiā€¢4mo ago
alright then
debargha
debarghaā€¢4mo ago
is your panel and wings on the same machine?
Toffi
Toffiā€¢4mo ago
yes
debargha
debarghaā€¢4mo ago
try running sudo wings --debug make sure to stop the old and see the logs
Toffi
Toffiā€¢4mo ago
DEBUG: [Feb 6 17:19:46.651] making request to external HTTP endpoint endpoint=https://panel.1stclub.xyz/api/remote/servers?page=0&per_page=50 headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.11.8 (id:uRcSmQ8hRbj2R3LZ)]] method=GET
FATAL: [Feb 6 17:19:46.689] failed to load server configurations error=manager: failed to retrieve server configurations: Error response from Panel: AccessDeniedHttpException: You are not authorized to access this resource. (HTTP/403)
DEBUG: [Feb 6 17:19:46.651] making request to external HTTP endpoint endpoint=https://panel.1stclub.xyz/api/remote/servers?page=0&per_page=50 headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.11.8 (id:uRcSmQ8hRbj2R3LZ)]] method=GET
FATAL: [Feb 6 17:19:46.689] failed to load server configurations error=manager: failed to retrieve server configurations: Error response from Panel: AccessDeniedHttpException: You are not authorized to access this resource. (HTTP/403)
debargha
debarghaā€¢4mo ago
is your node proxied?
Toffi
Toffiā€¢4mo ago
not right now im trying with out
debargha
debarghaā€¢4mo ago
do you have waf enabled?
Toffi
Toffiā€¢4mo ago
whats that?
debargha
debarghaā€¢4mo ago
or maybe im under attack mode etc also, is your port open?
Toffi
Toffiā€¢4mo ago
on https://dnschecker.org/ it says closed...
DNS Checker
DNS Checker - DNS Check Propagation Tool
Check DNS Propagation worldwide. DNS Checker provides name server propagation check instantly. Changed nameservers so do a DNS lookup and check if DNS and nameservers have propagated.
Toffi
Toffiā€¢4mo ago
for 8080
debargha
debarghaā€¢4mo ago
arent you using 8443? also it will say closed if your service isnt running you should check it in your vps
Toffi
Toffiā€¢4mo ago
yes for protected, but im now trying to make it work without proxy protection on vps 8080 and 8443 is opened
debargha
debarghaā€¢4mo ago
so have you edited the /etc/pterodactyl/config.yml right?
Toffi
Toffiā€¢4mo ago
yeah
debargha
debarghaā€¢4mo ago
in your oracle networking too?
Toffi
Toffiā€¢4mo ago
wdym?
debargha
debarghaā€¢4mo ago
are you using oracle vps?
Toffi
Toffiā€¢4mo ago
yes
debargha
debarghaā€¢4mo ago
so you have to also open the ports there
Toffi
Toffiā€¢4mo ago
yeah they're open
debargha
debarghaā€¢4mo ago
in oracle?
Toffi
Toffiā€¢4mo ago
yep
Toffi
Toffiā€¢4mo ago
wings status
No description
debargha
debarghaā€¢4mo ago
regenerate the token from your panel and paste it
Toffi
Toffiā€¢4mo ago
Daemon Master Key ?
debargha
debarghaā€¢4mo ago
no in configuration
Toffi
Toffiā€¢4mo ago
Hmm, now the site gives 523 straight away
debargha
debarghaā€¢4mo ago
panel?
Toffi
Toffiā€¢4mo ago
yes when I try to reach now it reached but still doesn't work properly
Toffi
Toffiā€¢4mo ago
No description
debargha
debarghaā€¢4mo ago
logs? sudo wings diagnostics
debargha
debarghaā€¢4mo ago
wings --debug ok you have a firewall issue
Toffi
Toffiā€¢4mo ago
alright, hmm
debargha
debarghaā€¢4mo ago
your wings ip is blocked by panel cloudflare go to cloudflare > security > waf then add rule ip source address equals yout wings ip
Toffi
Toffiā€¢4mo ago
wings ip = ?
debargha
debarghaā€¢4mo ago
then choose action skip Wings ip is your public oracle ip if your panel and wings same machine then sane ip yhis will 101% work
Toffi
Toffiā€¢4mo ago
oh yeah.. ?
No description
debargha
debarghaā€¢4mo ago
yes select everything everything possible
Chaika
Chaikaā€¢4mo ago
If you think it's blocking it, you should check under Security -> events first if you can even see it
debargha
debarghaā€¢4mo ago
yes
Chaika
Chaikaā€¢4mo ago
there's some products that aren't skippable
debargha
debarghaā€¢4mo ago
supah bot fight
Toffi
Toffiā€¢4mo ago
No firewall events found matching your filters
debargha
debarghaā€¢4mo ago
what filter you add? wings ip?
Toffi
Toffiā€¢4mo ago
Nothing
debargha
debarghaā€¢4mo ago
oh
Chaika
Chaikaā€¢4mo ago
you disabled proxy for the panel subdomain, looks like?
Toffi
Toffiā€¢4mo ago
yes, I'm trying without proxy temporary I will try to configure the proxy some day
debargha
debarghaā€¢4mo ago
oh your panel isnt proxied šŸ’€ You regenerated your token righr? you overwrited the file too right?
Toffi
Toffiā€¢4mo ago
I dont think the error was from firewall I regened the token and it worked then but anyway
debargha
debarghaā€¢4mo ago
No it isn't i thought ur panel is proxied
Toffi
Toffiā€¢4mo ago
yep ofc
debargha
debarghaā€¢4mo ago
like it worked? green heart too?
Toffi
Toffiā€¢4mo ago
yeah
debargha
debarghaā€¢4mo ago
then maybe reset the daemon key, save it, then again regenerate token
Toffi
Toffiā€¢4mo ago
why again? it's works now
debargha
debarghaā€¢4mo ago
after resetting the daemo n key?
Toffi
Toffiā€¢4mo ago
yes I resetted that and also conf key
debargha
debarghaā€¢4mo ago
hm that was the issue ok nvm also dont proxy nodes if you are gonna use minecraft server, it won't connect then you can proxy the panel
Toffi
Toffiā€¢4mo ago
I meant to proxy the panel, not wings
debargha
debarghaā€¢4mo ago
oh then you dont have to use 8443
Toffi
Toffiā€¢4mo ago
Isn't there a solution to proxy wings? iirc
debargha
debarghaā€¢4mo ago
see you can but minecraft won't work (coz i have only tested that) maybe because minecraft tries to connect to the cloudflare ip
Toffi
Toffiā€¢4mo ago
aight
debargha
debarghaā€¢4mo ago
is there any solution tho @Chaika
Chaika
Chaikaā€¢4mo ago
solution for what, I wasn't following? proxying minecraft?
debargha
debarghaā€¢4mo ago
yes
Chaika
Chaikaā€¢4mo ago
Cloudflare Spectrum but it's stupid expensive ($1/gb) out of an Enterprise Contract or Magic Transit but it's fully Enterprise
debargha
debarghaā€¢4mo ago
oh
Toffi
Toffiā€¢4mo ago
Aalright I see, so with Cloudflare's proxy I can't protect Pterodactyl right?
debargha
debarghaā€¢4mo ago
you can protect panel...
Toffi
Toffiā€¢4mo ago
yes, I meant the servers
debargha
debarghaā€¢4mo ago
oh maybe others games may work i dont know much about networking lol
Toffi
Toffiā€¢4mo ago
alright
Chaika
Chaikaā€¢4mo ago
cf's normal proxy is just http/https unless the game is a http powered game then won't work with normal proxy lol
Toffi
Toffiā€¢4mo ago
yeah lol
debargha
debarghaā€¢4mo ago
lol
Toffi
Toffiā€¢4mo ago
SuperKali
YouTube
HOW TO PROTECT YOUR PTERODACTYL PANEL WITH CLOUDFLARE PROXY
Hi guys, today I will show you how to protect your server against DDoS attacks through Cloudflare, in the next video, I will show how to add new nodes on the pterodactyl panel! šŸ”’ This tutorial requires a Domain and VPS (KVM & VMware) šŸ”§ I need support, can contact you for some help? āž”ļø Yes, you can contact me through my email or discord, some f...
Toffi
Toffiā€¢4mo ago
So this was the tutorial I was following And he put 8443 as the port of daemon
debargha
debarghaā€¢4mo ago
3 yo old video, things may have changed altough not sure...
Toffi
Toffiā€¢4mo ago
I think it's pretty similar but shouldn't the panel still work if I put 8443 as daemon port? bcz it shut here
debargha
debarghaā€¢4mo ago
yes, any unique port will work until port is opened, that error was due to invalid token/key
Toffi
Toffiā€¢4mo ago
hmm, what could have cause that?
debargha
debarghaā€¢4mo ago
maybe you accidently edited the key in the config.yml while changing port maybe some letter got put, etc.
Toffi
Toffiā€¢4mo ago
oh right yeah Now that I know that, I also cant proxy the panel, cause wings has same IP and so minecraft & servers, right?
debargha
debarghaā€¢4mo ago
no you obviously can, and you should to protect from ddos aatacks, just use a different domain for the node
Toffi
Toffiā€¢4mo ago
So I would need to delete my current node and make a new one w/ diff subdomain
debargha
debarghaā€¢4mo ago
no no, you can switch subdomains too, no need to delete annything at all
debargha
debarghaā€¢4mo ago
ignore daemon
Toffi
Toffiā€¢4mo ago
Oh oh okay great
Stacktrace:
Get "https://panel.1stclub.xyz/api/remote/servers?page=0&per_page=50": tls: failed to verify certificate: x509: certificate signed by unknown authority
http: request creation failed
Stacktrace:
Get "https://panel.1stclub.xyz/api/remote/servers?page=0&per_page=50": tls: failed to verify certificate: x509: certificate signed by unknown authority
http: request creation failed
I'm trying to proxy it now, but cloudflare certificate "signed by unkown authority"? @debargha ?
debargha
debarghaā€¢4mo ago
maybe some issue go to ur cloudflare > ssl/tls > set cert to max setting
Toffi
Toffiā€¢4mo ago
oh yes it was by cf side, now the ssl works, BUT my panel (wings) stoppped work :/ I fixed that^ and set wings port to 8443 and sftp to 2053 and everything seems to work as they should but wings still not working on panel? Gives 504 error again
http: TLS handshake error from :52424: local error: tls: bad record MAC
http: TLS handshake error from :52424: local error: tls: bad record MAC
Toffi
Toffiā€¢4mo ago
sometimes the wings is ok, but sometimes it goes down...
No description
Toffi
Toffiā€¢4mo ago
@debargha do you have any idea?
debargha
debarghaā€¢4mo ago
how do you run wings?
Toffi
Toffiā€¢4mo ago
systemctl start/restart wings and sudo wings (--debug) but there's something with the certificate currently it's valid but somethings not working I also do get ssh error..?
sftp: failed to accept inbound connection error=ssh: no common algorithm for key exchange; client offered: [diffie-hellman-group-exchange-sha25
sftp: failed to accept inbound connection error=ssh: no common algorithm for key exchange; client offered: [diffie-hellman-group-exchange-sha25
so, I still havent figured out.. @debargha @Chaika
Toffi
Toffiā€¢4mo ago
it's strange that panel shows green heart
No description
Toffi
Toffiā€¢4mo ago
http: TLS handshake error from :49416: local error: tls: bad record MAC
http: TLS handshake error from :49416: local error: tls: bad record MAC
something with sftp it seems to be
debargha
debarghaā€¢4mo ago
when you click on that node, oracle cloud, are the information showing or loading forever
Toffi
Toffiā€¢4mo ago
loading forever the wings/panel is working like half console shows, but not files.. it's strange 504 is the error code
debargha
debarghaā€¢4mo ago
that means your browser can connect to winga but your panel can't thats because your panel isnt connected to wings First of all I hope you didn't proxy the node.
Toffi
Toffiā€¢4mo ago
I proxied panel
debargha
debarghaā€¢4mo ago
then don't use 8443 port yes its fine
Toffi
Toffiā€¢4mo ago
I dont
debargha
debarghaā€¢4mo ago
You are using 8080 then?
Toffi
Toffiā€¢4mo ago
yep
Toffi
Toffiā€¢4mo ago
No description
debargha
debarghaā€¢4mo ago
Ok thats the issue You should use lets encrypt cert for wings is that one from cloudflare?
Toffi
Toffiā€¢4mo ago
yeah it is full strict
debargha
debarghaā€¢4mo ago
Cloudflare cert is only valid when you use cloudflare So use certbot for wings
Toffi
Toffiā€¢4mo ago
Oh yeah ofc
debargha
debarghaā€¢4mo ago
because your wings isnt using cloudflare
Toffi
Toffiā€¢4mo ago
yeah
debargha
debarghaā€¢4mo ago
so run certbot certonly then gen cert fpr you wings node then again go to config.yml and change the path to that ssl and then restart and u done
Toffi
Toffiā€¢4mo ago
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Nginx Web Server plugin (nginx)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Nginx Web Server plugin (nginx)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Do I use nginx one? @debargha
ssh: no common algorithm for key exchange; client offered:
ssh: no common algorithm for key exchange; client offered:
The certificate seems to work now, but now I get this and my wings still goes down.. @debargha That's for sftp, but I think my server runs good now
debargha
debarghaā€¢4mo ago
yes
Toffi
Toffiā€¢4mo ago
service wings status
No description
debargha
debarghaā€¢4mo ago
what os are you using
Toffi
Toffiā€¢4mo ago
vps or my pc
debargha
debarghaā€¢4mo ago
run systemd-detect-virt
Toffi
Toffiā€¢4mo ago
kvm
debargha
debarghaā€¢4mo ago
thats good
Toffi
Toffiā€¢4mo ago
it seems to work now though
debargha
debarghaā€¢4mo ago
ohk
Toffi
Toffiā€¢4mo ago
tysm I will say if something goes wrong again:D
debargha
debarghaā€¢4mo ago
sure wlcm
Want results from more Discord servers?
Add your server
More Posts