from marighost@piefed.social to selfhosted@lemmy.world on 02 Dec 23:09
https://piefed.social/c/selfhosted/p/1531733/need-guidance-on-dns-configs-for-vps-pangolin
Good morning/evening my selfhosting friends,
I’m kind of a noob, so hopefully I can articulate what I’d like to accomplish well. I am currently in the process of overhauling my entire homelab, which has involved me setting up a VPS as a proxy/tunnel for remotely connecting to/exposing services on my LAN due to my ISP having me behind CGNAT.
Currently, I have a subdomain (provided via Namecheap) pointed at the static IP of the VPS. With this, I can ssh into my server with ssh root@vps.domain.tld which is what I want. Now, I seem to have landed on Pangolin for accomplishing the aforementioned proxy. However, when installing it, I’m stumped by the first few questions: Pangolin wants me to input my domain.tld, followed by pangolin.domain.tld for Pangolin specifically.
Reading the docs, they then want me to either create an A Record for a wildcard domain at my VPS’ IP, or create a root domain record aimed at the IP. My question is, how do I keep the vps.domain.tld while also allowing for pangolin.domain.tld to be valid at the same IP? I know I can create SRV Records, but I am unsure how Pangolin will handle that with the multiple TCP/UDP ports it needs open. I’ll also want to access it via HTTPS obviously, which may add some complexity.
I hope this makes sense, sorry if anything is unclear or if the solution is obvious.
threaded - newest
I haven’t done that myself but from https://pimylifeup.com/pangolin-linux/ I understand that will only be subdomain to access pangolin dashboard
Domains are just translation from name to IP. What gets served on which subdomain is then handled by nginx or traefik. AFAIK you can have all 3 (VPS, pangolin and root) to point at the same IP
Looks like a good resource to read, thanks! As you may know there are a billion and one guides for doing the same thing across a plethora of systems, and even more variables in between. Appreciate your time.
@marighost You can have multiple (sub)domains pointing to the same IP, no issue there.
So you can still have your vps subdomain AND another one for Pangolin. That's effectively how Pangolin itself works, assigning multiple subdomains to itself, so it can route the requests to other machines. It just does it without adding records to the DNS provider, it just listens to anything that gets sent to its IP through the wildcard address (unless you make Pangolin your DNS provider, that is).
Also, the wildcard (sub)domain will always have the lowest priority, so if there are ANY records pointing somewhere, they'll have precedence over the wildcard.
So, your DNS should contain three A records: one for vps, another for Pangolin, and a wildcard, all pointing to the vps address.
Hope this helps!
<img alt="BaMG0VqVhjgju7e.gif" src="https://media.piefed.social/posts/Ba/MG/BaMG0VqVhjgju7e.gif">
It really was that simple. Thank you!!! 😭