Current Events > Can someone here help me with DNS server redirection stuff?

Topic List
Page List: 1
Timohtep
08/26/19 3:14:42 PM
#1:


I'm following this guide:
https://github.com/valknight/MCBedrockDNSGuide#dns-setup-on-the-server

To be able to let me/my friends play Minecraft on a server I'm hosting on my old laptop. But I'm struggling with the DNS thing. The server is up and running, but the DNS redirect isn't working.

I'm running coreDNS on my laptop that's also running the server, but I'm totally unsure of how this is supposed to be done. The guide isn't very clear for a layman like myself. Do I need to run it in a specific way? Open up my network to internet traffic or something? I really don't know. Can anyone help? >_>
---
... Copied to Clipboard!
Timohtep
08/26/19 3:57:34 PM
#2:


... Copied to Clipboard!
ultimate reaver
08/26/19 4:01:07 PM
#3:


delete system 32 lmao

---
butts
... Copied to Clipboard!
Timohtep
08/26/19 4:01:49 PM
#4:


... Copied to Clipboard!
Rika_Furude
08/26/19 4:02:16 PM
#5:


Get a static IP from your ISP its easier
---
Posted with GameRaven 3.5.1
... Copied to Clipboard!
Giant_Aspirin
08/26/19 4:05:23 PM
#6:


Timohtep posted...
Do I need to run it in a specific way?


i believe you just need to create the configuration file `Corefile` with the contents like what the guide says and then run codeDNS
---
Playing: Yakuza Kiwami 2, Vermintide 2
You see it your way, I'll see it mine and I'll be fine
... Copied to Clipboard!
Shinnokxz
08/26/19 4:05:55 PM
#7:


You set a static IP for your server/whatever machine is running the server on your network. Ideally outside the scope of the DHCP.

DNS isn't even necessarily required if they are connecting by direct IP
... Copied to Clipboard!
Timohtep
08/26/19 4:07:22 PM
#8:


Giant_Aspirin posted...
Timohtep posted...
Do I need to run it in a specific way?


i believe you just need to create the configuration file `Corefile` with the contents like what the guide says and then run codeDNS

I did those things, on my PC that has the MC server on it. I set the manual DNS of the switch to the IP of the computer and now my switch won't connect to the internet. Do I need to open my pc to incoming traffic or something?
---
... Copied to Clipboard!
Timohtep
08/26/19 4:08:13 PM
#9:


Shinnokxz posted...
You set a static IP for your server/whatever machine is running the server on your network. Ideally outside the scope of the DHCP.

DNS isn't even necessarily required if they are connecting by direct IP

The DNS thing is important because the Switch only allows you to connect to very specific minecraft servers, and the dns thing is so it redirects the switch from one of those servers to your own custom server
---
... Copied to Clipboard!
Giant_Aspirin
08/26/19 4:13:21 PM
#10:


Timohtep posted...
Giant_Aspirin posted...
Timohtep posted...
Do I need to run it in a specific way?


i believe you just need to create the configuration file `Corefile` with the contents like what the guide says and then run codeDNS

I did those things, on my PC that has the MC server on it. I set the manual DNS of the switch to the IP of the computer and now my switch won't connect to the internet. Do I need to open my pc to incoming traffic or something?


does coreDNS produce any logs or anything that will tell you if its receiving traffic?
---
Playing: Yakuza Kiwami 2, Vermintide 2
You see it your way, I'll see it mine and I'll be fine
... Copied to Clipboard!
Timohtep
08/26/19 4:20:02 PM
#11:


... Copied to Clipboard!
Timohtep
08/26/19 4:28:25 PM
#12:


Here is my sequence of events.

1. Run CoreDNS.
2. This text displays in a command-line-type window.
.:53
2019-08-26T13:23:24.497 -07:00 (INFO] CoreDNS-1.6.2
2019-08-26T13:23:24.498-07:00 [INFO] windows/amd64, go1.12.8, 795a3eb
CoreDNS-1.6.2
windows/amd64, go1.12.8, 795a3eb

3. I assume this means it's running.
4. I plug in the IP to my Switch's manual dns settings.
5. My switch fails to connect to the internet.
---
... Copied to Clipboard!
Rexdragon125
08/26/19 4:37:44 PM
#13:


That's not how any of this works
... Copied to Clipboard!
Timohtep
08/26/19 4:38:26 PM
#14:


... Copied to Clipboard!
Giant_Aspirin
08/26/19 4:46:39 PM
#15:


Timohtep posted...
5. My switch fails to connect to the internet.


is it supposed to? im not sure the default Switch online stuff should work? have you tried just running Minecraft
---
Playing: Yakuza Kiwami 2, Vermintide 2
You see it your way, I'll see it mine and I'll be fine
... Copied to Clipboard!
Timohtep
08/26/19 4:48:29 PM
#16:


Giant_Aspirin posted...
Timohtep posted...
5. My switch fails to connect to the internet.


is it supposed to? im not sure the default Switch online stuff should work? have you tried just running Minecraft

It should. The way the coredns thing is supposed to work is it's supposed to check for traffic to that specific server, then redirect it to mine. Else, just direct to cloudflare's DNS.
---
... Copied to Clipboard!
treewojima
08/26/19 4:48:33 PM
#17:


Post your CoreDNS config file.
... Copied to Clipboard!
Timohtep
08/26/19 4:51:19 PM
#18:


treewojima posted...
Post your CoreDNS config file.

.:53 {
rewrite name exact mco.lbsg.net [the ip that will get you to the mc server]
forward . 1.1.1.1:53
}

---
... Copied to Clipboard!
treewojima
08/26/19 5:11:51 PM
#20:


Hmm, I was going to say that you might not be able to rewrite as an IP and that you need a domain name pointing to your server, but neither that article nor the CoreDNS docs are clear about that.

You can try adding the error and log plugins to get more details from your DNS server. Add these lines:

.:53 {
rewrite name exact mco.lbsg.net [the ip that will get you to the mc server]
forward . 1.1.1.1:53
errors
log

}


Also, just to be clear, you're hosting both the Minecraft server and the CoreDNS server on your laptop, and plugging the laptop IP into the manual DNS field in your Switch, right?
... Copied to Clipboard!
Timohtep
08/26/19 5:12:46 PM
#21:


treewojima posted...
Hmm, I was going to say that you might not be able to rewrite as an IP and that you need a domain name pointing to your server, but neither that article nor the CoreDNS docs are clear about that.

You can try adding the error and log plugins to get more details from your DNS server. Add these lines:

.:53 {
rewrite name exact mco.lbsg.net [the ip that will get you to the mc server]
forward . 1.1.1.1:53
errors
log

}


Also, just to be clear, you're hosting both the Minecraft server and the CoreDNS server on your laptop, and plugging the laptop IP into the manual DNS field in your Switch, right?

Yeah, that's what I'm doing. I'll add those to the file and try again.
---
... Copied to Clipboard!
Timohtep
08/26/19 5:18:24 PM
#22:


It seemed to do nothing. I don't see any log or error files generated.
---
... Copied to Clipboard!
treewojima
08/26/19 5:28:18 PM
#23:


They should dump to stdout by default, which means the console window you started up the server in. I've never used a Switch so I don't know how it goes about its network setup and connecting to the Internet.

What you could do is use your laptop, open up a second console window after you get CoreDNS started, and use the nslookup command to query localhost and see if it's properly handling DNS requests. Something like:

C:\> nslookup
nslookup> server 127.0.0.1 (set the DNS server to your laptop)
[bunch of output]
nslookup> mco.lbsg.net (should come back to your laptop IP)
[output]
nslookup> google.com (check if it's forwarding other requests properly)
[output]


That's the basic troubleshooting technique I use when working on my home network DNS server (I don't use CoreDNS sadly so I can't tell you much about it)
... Copied to Clipboard!
Timohtep
08/26/19 5:47:35 PM
#24:


treewojima posted...
What you could do is use your laptop, open up a second console window after you get CoreDNS started, and use the nslookup command to query localhost and see if it's properly handling DNS requests. Something like:

C:\> nslookup
nslookup> server 127.0.0.1 (set the DNS server to your laptop)
[bunch of output]
nslookup> mco.lbsg.net (should come back to your laptop IP)
[output]
nslookup> google.com (check if it's forwarding other requests properly)
[output]

That's the basic troubleshooting technique I use when working on my home network DNS server (I don't use CoreDNS sadly so I can't tell you much about it)

Doing this did do some interesting things. It routed google.com correctly, but when I tried to nslookup mco.lbsg.net, it returned an error saying that the domain didn't exist. And I'm getting a solid amount of data in the command window for coredns, but I'm honestly not sure wtf it means
---
... Copied to Clipboard!
Timohtep
08/26/19 6:00:27 PM
#25:


why is this shit so stupid to figure out

why can't we just direct connect to servers on console it's so goddamn dumb
---
... Copied to Clipboard!
FFVII_REMAKE
08/26/19 6:07:03 PM
#26:


I recommend posti n on reddit r/techsupport or /network and not a place like gfaqs.
---
LA Clippers fan since 2019
https://i.imgtc.ws/UOwpJCI.jpg
... Copied to Clipboard!
Timohtep
08/26/19 6:10:48 PM
#27:


I solved part of it :O

All I had to do was port forward from 53 to 53 on my network's IP to my laptop

if that makes any sense

So it's working semi correctly now. my switch is using my laptop as a dns server, but now it won't connect to the server, rip
---
... Copied to Clipboard!
Timohtep
08/26/19 6:53:41 PM
#29:


Yeah now I'm just confused and mega annoyed because I'm so close yet so goddamn far.

CoreDNS is pushing some sort of NXDOMAIN error saying that the domain doesn't exist, but it's just the IP of the server. I really don't get it.

Could it be because they're the same IP or some shit? When I try to connect ingame it just says "Invalid IP"
---
... Copied to Clipboard!
Timohtep
08/26/19 7:11:51 PM
#30:


If I'm reading this right, it seems like the entirety of my problem now rests in "you can't put your IP in that spot, it needs to be a domain name"

how the fuck do I do that in my corefile
---
... Copied to Clipboard!
Timohtep
08/26/19 10:00:08 PM
#31:


I messaged the OP of the post on reddit asking for their advice, but does anyone have any ideas?
---
... Copied to Clipboard!
Timohtep
08/26/19 10:53:35 PM
#32:


... Copied to Clipboard!
Topic List
Page List: 1