Hi
Currently I’m running a few servers at my home and I own a domain. I’d like to access those servers from outside my network (right now that happens through a VPN) but I don’t know anything about A records and MX records and as I understand, that’s what’s needed to do this. So would there be a tutorial that explains this like I’m 5 years old?
On DNS you need A record if you have ipv4 only or A and AAAA records if you have ipv4 and ipv6.
You DNS outside you home servers? If you have dynamic IP at home you can’t host DNS on home server.
You have only 1 IP? You need port forwarding on you home gateway to home servers if you use somerhing like SSH. If you want access to something web based you need proxy. NGINX for example.
How it exactly work:
- Somewhere someone write youdomain.com in browser.
- Browser ask local dns: who is youdomain.com
- local dns ask another dns, and another and in one iteration request go to you dns. Or maybe some of dns have cached answer. But imagine that not.
- You dns send answer youdomain.com is 111.222.333.444 for example. That is A record.
- DNS work stop on that.
- Browser send request to 111.222.333.444 with HTTP header “Host: youdomain.com” and some path. / or /something maybe.
- Some balancer should get request and send in to right server in you home network.
UPD: don’t show to internet something risky interfaces. Proxmox web panel or something like that. This is a real bad idea. For that type of services VPN extremely greatest. Send you DNS to public without protection not a great idea too. Including pinhole. I think you will get into some botnet already on the 3rd day of work.
Hi there. We hope you’re enjoying NSQ. Will you please edit your post title so that it contains a question? It’s rule 1 in the sidebar. Thanks for posting!
A
(andAAAA
) records store your IP address, whileMX
record stores a domain for email servers to use.So if I want to go to www.mydomain.com/pihole to go to my pi-hole instance, I would create an A record containing the internal IP of pi-hole and an MX one to configure the subdomain (www.mydomain.com/pihole), is that correct?
No, the MX recourd is only for emails, and for the paths (like in your example), it’s handled by your server.
Also, the subdomains are
subdomain.yourdomain.com
.
What is your end goal? What services are you trying to access from outside your network?
Lots of servers running. Main System is proxmox. I have an Ubuntu server running on that with docker installed which runs about everything (pi-hole, nginx, jellyfin, radarr, sonarr, (even) Firefox, and more). So end goal would be to go to www.mydomain.com/pihole to access pihole, to www.mydomain.com/jellyfin to go to jellyfin and so on.
I’d recommend running pihole.yourdomain.com or jellyfin.yourdomain.com instead. I think using yourdomain.com/service might cause you some problems, that’s why i heard other recommend use subdomains instead.
What I’d personally recommend is Cloudflare Tunnels, it allows you to lock down access to your services with an emailed code or other authentication method, as well as avoiding having ports forwarded to your services. It’s an easy way to avoid port forwarding and not have to worry about whether all the services you’re hosting are 100% secure, since you’ll be exposing them to the internet.
The downside is you’re routing all your traffic through Cloudflare.