Revertron / Alfis

Alternative Free Identity System
https://alfis.name
GNU Affero General Public License v3.0
284 stars 28 forks source link

Right Way To Specify IP and Port #347

Closed krionical closed 1 year ago

krionical commented 1 year ago

When I go to add a record in ALFIS, there is a spot that says "port" which I assume means the port that you want the address record to point to. My service that I want to expose via ALFIS is in the form of [IP6 Address]:2400. When I map my name to the domain of mysite.ygg, it will pull up the [IP Address] part without the port. This isn't where the service lives. My question then is the port field supposed to be used for the form of the case I outlined above? If not, where do I set it so that when [IP6 Address] resolves that it goes to the specified port? Nginx? Is there some other record form that does this that ALFIS supports I don't know about? (Something like url redirect via namecheap?)

Revertron commented 1 year ago

I recommend you to read something about types of DNS records. Usual types A - for IPv4 and AAAA for IPv6 don't use port, just the IP address. Those fields are designed for other types of records, for example SRV, that takes some domain, port, weight and priority and some client software like XMPP-clients can resolve SRV record and use that info to connect.

krionical commented 1 year ago

I recommend you to read something about types of DNS records. Usual types A - for IPv4 and AAAA for IPv6 don't use port, just the IP address. Those fields are designed for other types of records, for example SRV, that takes some domain, port, weight and priority and some client software like XMPP-clients can resolve SRV record and use that info to connect.

Yes, I'm familiar with DNS and records although I am less familiar with DNS as pertains to IP6 and really, the fact that those fields were visible for the AAAA record make it seem like they are applicable and if they aren't, in my opinion they shouldn't be there. (you could, for instance, be specifying something unique in your resolver that makes an AAAA record suddenly take into consideration things like ports--how would a user know that you hadn't done such a thing?)

I had examined the SRV record for this purpose, but it seems like it doesn't like the way I am specifying something since it complains about it not being a valid record. An example might prove helpful for people like me.

krionical commented 1 year ago

I just found out the priority and weight were the issues with the SRV record. The values are not optional. This wasn't clear from the interface either, as I wasn't sure if it was upset with the IP6 format or possibly something in the name field.

Revertron commented 1 year ago

The DNS is not simple, and is not for people without any knowledge. You should know what you are doing. The same as with the regular DNS providers.

krionical commented 1 year ago

The DNS is not simple, and is not for people without any knowledge. You should know what you are doing. The same as with the regular DNS providers.

Regular DNS providers have interface designers (for web management) and strictly adhered to standards (along with good documentation) They aren't, for instance, alternative DNS's for mesh nets. The documentation in this project is severely lacking, and the support is bordering on insulting.

7 hours later, I mined the service record and it still didn't solve the issue. I was going to use ALFIS as an example in a technology course, but I guess I might use it as a cautionary tale concerning hubris and how the internet got screwed up to start with. I don't have the time to keep mucking with it, which is why I asked the question . (FYI: when someone asks a question, it is often because they want to reduce the time it requires by asking someone who has all ready done a thing) I have, of course, made plenty of service records in the past. They weren't for Yggdrasil which is a different bird. Service records often assume default values. They don't here. Documentation.