Unique DNS to home Minecraft server.
-
Hi All,
This may not be the right place, but I need help. I'm running Minecraft (Bedrock Edition) on a Nintendo Switch, for which I made my own Minecraft server. Unfortunately, the only way I can achieve this is to change the DNS to an American server, so that when I log in to Hive or another server in the game, it will run into an error and offer the server settings from where I can access my own. I tried DNS Resolver, but it doesn't work. So when I want to access the hive servers, pfsense should change the DNS access to a certain IP address. If I test this on pfsense with command or other options, pfsense always gives the DNS ip address I want to modify, but even if pfsense is set up as DNS on a computer or on NSW, the original ip addresses are displayed there with an nslookup, so I can only use my own server if I manually enter that ip address. However, my internet connection speed drops to 10% because of DNS. Can anyone help me figure out how to change the DNS settings when accessing certain "sites"?
Thank you in advance,
Peter -
@nbk333 said in Unique DNS to home Minecraft server.:
However, my internet connection speed drops to 10% because of DNS.
Sorry but that is not a thing.. Your connection speed has zero to do what dns you might use or what method of dns (resolve or forward)
Now it is possible that dns returns X ip for something you want to talk to vs Y. And X is not good choice, maybe their connection sucks, or maybe your isp peering to get there sucks, or maybe its out of region for your source IP and they throttle, etc..
But no your internet connection doesn't get throttle or change depending on what/how you do dns.
As to specifically what you wanting to accomplish for minecraft server not clear.. But dns for some fqdn makes no difference where you point for dns.. If I create a record in public domainX.tld - that would be globally available.
Sounds more like a minecraft regional thing with where you connect your server, and what regions those are available from. Or how they handle dns in their service for minecraft servers?
As to this question
Can anyone help me figure out how to change the DNS settings when accessing certain "sites"?
You could setup a domain override in unbound - what this does is tell unbound, hey if looking up something.domainX.tld - go ask this/these name servers for that.
https://docs.netgate.com/pfsense/en/latest/services/dns/resolver-domain-overrides.html
While this mentions internal domains and name servers - you could point any domain to any nameserver be it internal or external.
-
@johnpoz
Accessing my own minecraft server only works if the primary DNS address of NSW is: 104.238.130.180. Then if I select any server in the game, it offers to add the server so I can access my own. However, I don't want to use this DNS address permanently because there is no internet connection unless I specify pfsense as secondary. But since it tries the primary one, internet access, downloads, speed are slow. It shouldn't have anything to do with it, but it is. Internet with fixed DNS is 100mbit, with pfsense only 650mbit.Currently, NSW is on a fixed IP and I have set up DNS (Bedrock DNS) via pfsense. I wanted to achieve this with DNS Resolvr, so that if something wants to reach e.g. hivebedrock.network or mco.lbsg.net or eu.lifeboat.games or play.galaxite.net addresses using DNS override, the DNS should be 104.238.130.180. I add it to the system, restart the service, test it on a firewall, I see that it returns this IP, then I check it with nslookup on a Windows client and it returns the original IP, not the one I redirected it to. That's why NSW doesn't work either if the DNS is only the pfsense IP. I hope I managed to describe it clearly. Are you aware of this? NAT redirect didn't work either.
My goal would be for the IP address to always be the same for certain domain names.
Thank you in advance,
Peter -
@nbk333 said in Unique DNS to home Minecraft server.:
It shouldn't have anything to do with it, but it is. Internet with fixed DNS is 100mbit, with pfsense only 650mbit.
Sorry but NO.. not sure what your doing to test this - but there is NO possible way what dns you use has anything to do with your internet connection speed..
What test did you do to come to that conclusion? If you ask dns A for host.domain.tld and it returns 1.2.34, and if you ask dns B for host.domain.tld and returns 4.5.6.7.. then sure your speed to 1.2.3.4 or 4.5.6.7 could be different but that has zero to do with what dns you point to. It has to do with what IP your talking to.
As to NSW, not sure what your talking about. What does NSW mean in this context? But 104.238.130.180 returns a PTR of some mail server
;; QUESTION SECTION: ;180.130.238.104.in-addr.arpa. IN PTR ;; ANSWER SECTION: 180.130.238.104.in-addr.arpa. 3600 IN PTR mail.pyratron.com.So I took your example play.galaxite.net if I ask that 104 ns I get back
;; QUESTION SECTION: ;play.galaxite.net. IN A ;; ANSWER SECTION: play.galaxite.net. 10800 IN A 216.155.157.165 play.galaxite.net. 10800 IN A 104.238.130.180 ;; AUTHORITY SECTION: play.galaxite.net. 10800 IN NS play.galaxite.net. ;; ADDITIONAL SECTION: play.galaxite.net. 10800 IN AAAA 2001:19f0:c:1173:5400:4ff:fe4e:ac9e ;; Query time: 43 msec ;; SERVER: 104.238.130.180#53(104.238.130.180)If I normally just resolve it - I get back this answer
;; QUESTION SECTION: ;play.galaxite.net. IN A ;; ANSWER SECTION: play.galaxite.net. 3600 IN CNAME us.play.galaxite.net. us.play.galaxite.net. 3600 IN A 51.79.82.89 ;; Query time: 68 msec ;; SERVER: 192.168.9.253#53(192.168.3.10)So here I setup a domain override for galaxite.net - now when I ask I get back those other IPs, not the 51.79 IP it hands be back because I normally just resolved it.

I didn't get back any IPv6 "AAAA" because I have unbound setup not to process AAAA
Internet with fixed DNS is 100mbit, with pfsense only 650mbit.
You understand 650 is 6x faster than 100 right? But sure like I showed you when I ask that 104 address directly, I get different IPs then if I just resolve it.. points me to a cname for us, and prob local to me vs wherever that other IP is - so sure if 51 is local in the US, prob be faster than some other IP say in EU, since I am in the US. But your "speed" has nothing to do with the dns you use. Your speed difference would have to do with what IP your talking to - where it is, where you are, etc. Not the dns.
-
@johnpoz
I would like to shorten my question. I would like to implement with pfsense that if a device wants to access a domain, the associated IP address should not be the real one, but one that I have specified. This is the only way I can avoid minecraft offering to access its own server on NSW. Unfortunately, this did not work for me with the DNS resolver. This IP address is written in several places that this should be used, and in the case of PlayStation this: 45.55.68.52.If I manually set either of the two IP addresses as the primary DNS on the console, I can reach the local server.
The custom script did not produce any results either.
local-zone: "hivebedrock.network." redirect
local-data: "hivebedrock.network. 60 IN A 45.55.68.52"local-zone: "inpvp.net." redirect
local-data: "inpvp.net. 60 IN A 45.55.68.52"local-zone: "lbsg.net." redirect
local-data: "lbsg.net. 60 IN A 45.55.68.52"local-zone: "galaxite.net." redirect
local-data: "galaxite.net. 60 IN A 45.55.68.52"local-zone: "enchanted.gg." redirect
local-data: "enchanted.gg. 60 IN A 45.55.68.52"Thank you for your answers and the helpful suggestion. Maybe you have an idea about this? I don't want to install my own DNS, I want to solve it with pfsense. Unfortunately, the override didn't work either. I set it up, but when I ping the domain, I don't get the overriden IP back, for example from the command line on Windows.
Thanks a lot,
Peter -
@nbk333 why would you setup a different dns??
If you want to resolve a fqdn host.domain.tld - just setup a host override.
And again what is NSW??
You understand your redirects would be anything.domain.tld would resolve to those IPS.

;; QUESTION SECTION: ;sljfdslfjs.hivebedrock.network. IN A ;; ANSWER SECTION: sljfdslfjs.hivebedrock.network. 60 IN A 45.55.68.52 ;; Query time: 1 msec ;; SERVER: 192.168.9.253#53(192.168.9.253) ;; WHEN: Tue Jun 16 04:38:47 Central Daylight Time 2026 ;; MSG SIZE rcvd: 75;; QUESTION SECTION: ;hivebedrock.network. IN A ;; ANSWER SECTION: hivebedrock.network. 60 IN A 45.55.68.52 ;; Query time: 1 msec ;; SERVER: 192.168.9.253#53(192.168.9.253) ;; WHEN: Tue Jun 16 04:38:54 Central Daylight Time 2026 ;; MSG SIZE rcvd: 64Why would you serve up a 60 second ttl if your manually pointing anything.domain to some specific ip.. All that is going to do is force more queries.
Did you forget server: in your options box (see my example).
If these things are not working - you are setting them up wrong, or your devices are not asking pfsense for dns.. All of these settings are simple enough to test with a simple query with your fav tool. As to the domain override pointing to the ns.. I showed you it working - do a sniff on your wan when you do a query for something.. Did pfsense ask the IP you want for domainX.tld ?
Maybe your setting them in the forwarder (dnsmasq) not the resolver, or maybe you are using the forwarder and setting them in resolver (unbound)
-
@nbk333 said in Unique DNS to home Minecraft server.:
The custom script did not produce any results either.
local-zone: "hivebedrock.network." redirect
local-data: "hivebedrock.network. 60 IN A 45.55.68.52"I tried that.
First, a test before changing anything :C:\Users\Gauche>nslookup hivebedrock.network. Serveur : pfSense.bhf.tld. Address: 2a01:cb19:dead:beef:92ec:77ff:fe29:392c Réponse ne faisant pas autorité : Nom : hivebedrock.network Addresses: 5.135.237.238 46.105.88.69 5.196.205.184 5.196.205.183 5.135.18.248Seems plausible to me.
Now : a quick cut and paste :

and test again :
C:\Users\Gauche>nslookup hivebedrock.network. Serveur : pfSense.bhf.tld Address: 2a01:cb19:dead:beef:92ec:77ff:fe29:392c Nom : hivebedrock.network Address: 45.55.68.52Works fine form me

( Info here ^^ ) -
@johnpoz
Sorry NSW is Nintendo Switch. The server: command is there, but I didn't cut out the whole part because I also use DNSBL. All my devices use pfsense for DNS. By the way, if I disable DNSBL, it doesn't work properly either. I don't use any other DNS service, I wrote it because I don't want to, but I want to solve it with pfsense, but I'll try it then. Thanks for your answers! -
@nbk333 see @Gertjan response - there is no trick to this, this is basic stuff. And simple enough to validate with a simple query with your fav dns client tool (dig, host, nslookup, doggo, etc). if its not working you are doing something wrong?
Or not actually asking unbound.
You set unbound that if any queries for anything.domain.tld with your redirect, its going to return the answer you set. Period, if not - then you didn't set it correctly, didn't restart unbound? Not asking unbound?
What you posted is in the correct format, since I just copied and pasted what you posted in to my unbound, and bobs your uncle - it returned what was set.
-
Extra info : About :
Not asking unbound?
This IPv6 :

is the IPv6 of my pfSense LAN, I've should have told that. It would be way more clear if it was mentioning here : "192.168.1.1" which is also my pfSense LAN using IPv4 format.
This detail tells me that my PC, nslookup, is using my pfSense as a DNS source, and not some one else. This 'some one else' wouldn't be aware of your local DNS override ..... -
@johnpoz

I don't know what my problem could be. Neither host override nor custom script... -
@nbk333 is pfsense IP 192.168.33.254? It for sure should resolve its own name
$ nslookup Default Server: sg4860.home.arpa Address: 192.168.9.253If unbound doesn't even resolve its own name - you got something odd going on. Unbound should always resolve the PTR to pfsense name and domain you have in general setup.

either that name server your pointing to is not pfsense ip 192.168.33.254 or you got something borked yeah. Which would explain stuff your setting up in overrides or via options isn't working.
When you use a tool like nslookup and it goes to some IP to use as server, first thing it does is a PTR query for that IP to that IP.. this should return the fqdn of that IP.
example
> server 192.168.3.10 Default Server: pihole.home.arpa Address: 192.168.3.10 > server 8.8.8.8 Default Server: dns.google Address: 8.8.8.8You showing unknown, says 192.168.33.254 has no ptr - which would not be how unbound works or pfsense is setup out of the box.
do you have dns redirection setup in pfsense - pointing to something other than 127.0.0.1?
-
-
@nbk333 there is zero reason to have cloudflare dns in there, unless you have unbound setup to forward..
btw .local is a horrible choice for your tld, this is used by mdns.. Not something you should use. that shouldn't cause this problem. But it not best practice.
use maybe nbktech.internal - internal is new local use domain/tld like home.arpa.. Not yet sure if it has passed all the hurdle to be official yet but its coming.
-
@johnpoz said in Unique DNS to home Minecraft server.:
there is zero reason to have cloudflare dns in there,
And things can get worse ^^
As stated :

so from now the DHCP server will give leases to the LAN devices, and in the lease there is a suggested DNS : 1.1.1.1 and 1.0.0.1 ( ! )
From now on, these LAN devices will bypass the pfSense resolver's DNS, and go straight to 1.1.1.1 and or 1.0.0.1 with their DNS requests.
This means : when you set up some local resolver DNS info like :
the LAN devices will never have access to this info. You told them top use another resolver = 1.1.1.1 and/or 1.0.0.1.
Now you have to place your DNS override on '1.1.1.1' and '1.0.0.1' ... which is impossible
-
@Gertjan said in Unique DNS to home Minecraft server.:
the LAN devices will never have access to this info. You told them top use another resolver = 1.1.1.1 and/or 1.0.0.1.
Now you have to place your DNS override on '1.1.1.1' and '1.0.0.1' ... which is impossibleIn my distress I restarted pfsense. It has been working since then. I don't know what the problem was. The PTR record is now good, and it returns the correct IP address for the overwritten domain under both Windows and Linux. I am using the Community version and recently updated to the latest version, but I think this is impossible, but I can't say what could have caused the problem. Thank you very much to everyone for the constructive help and advice!!!!

