panel
panel copied to clipboard
Panel returns errormessage if FQDN only provides AAAA record (and no A record)
Current Behavior
If I try to add a FQDN with only one AAAA record (IPv6 only) I have the problem that I cannot change my settings because I recieve an error: "The FQDN or IP address provided does not resolve to a valid IP address." This seems to be because the panel checks only for IPv4 addresses. Because there is none I cannot save my settings.
If I add the FQDN directly into the corresponding database entry, my Node works perfectly fine with a IPv6 only connection.
I read the code (as good as I could, because I never dealt with php before) and think this is because the gethostbyname function is not capable of resolving IPv6 addresses and the Program throws the error message.
Expected Behavior
The FQDN is accepted no matter if there is a A, AAAA, or A and AAAA record behind the domain name.
Steps to Reproduce
Use a domain with only (and I mean only) a AAAA record and no A record (IPv6 only) and try to insert it into the FQDN field of the Node settings. You will encounter the error message: "The FQDN or IP address provided does not resolve to a valid IP address."
Panel Version
1.7.0
Wings Version
1.6.1
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
No response
Is there an existing issue for this?
- [x] I have searched the existing issues before opening this issue.
- [X] I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
- [X] I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
I see why this might be an issue, but considering ipv6 is so under utilized I also don't see it being an issue for many at the moment.
This is an issue because
- There are no IPv4 addresses left. IPv6 is the only solution and makes many aspects easier to maintain. And IPv6 only hosting is increasingly common because IPv4 is a huge cost factor.
- Pterodactyl Software works perfectly fine with no matter with which Internet Protocol version (this is good because software should not be dependent on any OSI layer below layer 4) - Huge plus for Pterodactyl
- The only thing that is not working is this function (gethostbyname). I have to take the purpures of this "check if FQDN has valid IP"-feature into question. Why is this Important for the panel? It is not even checking if it's a node behind the address, I could write google.com in there with no issue. All connections are between client and node directly, so the panel should not matter if there is an IP address behind. The Client resolves the hostname itself and this works perfectly fine.
As I wrote in my issue: Only the gethostbyname and its corresponding "check FQDN"-thing is not working with IPv6, the Panel and the Node are working flawless with IPv6 only.
Because this is a minor bug in the software and the codechange should not be drasticly I would really appreciate the fix of this issue
I'll take a look at this when I get a chance.
It's due to the use of PHP gethostbyname that doesn't support IPV6 with open issues about it for +20 years. dns_get_record should be used instead to check if there are A or AAAA records.
I'm having the same Issue, it's always quite tedious to change the database entry manually