Jump to content

How does DNS services work and why mine does not?

qxZap

Backstory:

About a year ago i wanted to make a dns server but dropped the project since was not so needed. However now became a better go since i am often creating new servers in my homelab. Not a big problem with 3-5 servers but i might escalate that and not even remember one single ip adress. One friend of mine had to do for a school project a dns server in c and though about doing something similar in python. Someone already did THIS but in a much wierder way... so started modifying his code and came up with THIS. Compared to the first version, now dig works with anything.. not just local defined in the config files, or those with only a higher domain.

 

Goal:

there are 2 goals and one of them is already hit:

1) dig deluge.local-net to actually return the ip of the desired machine (CHECK)

2) hit deluge.local-net on the browser and have the proper result (NOPE) 

 

Issue:

Using it as a primary dns on my windows machine actually works pretty good. But for some things it's not working as expected... if i go on pornhub, i see on the logs that it's being resolved among with other requests. But if i search for one of my custom ones this won't work.... and beyond that... windows does not call my server to try and solve any adress like el.chupa.cabra but just says that does not exist. And in the logs i see some calls for google instead, but not with that adress.

Can someone help with this?

 

Questions:

Does the format of the domain matter? If so, how should i name it for a local network?

Does the ip of the domain have an impact if it's a lan one?

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Does the format of the domain matter? If so, how should i name it for a local network?

No, but for non conflicting sake, you can use like .local or .home or what ever unique from the rest of the internet.

 

Does the ip of the domain have an impact if it's a lan one?

The ip of the domain should be static, if the ip is changing (like using DHCP), it won't be resolved.

You should set a static IP address for the server and link the IP and domain in the dns server.

Ryzen 5700g @ 4.4ghz all cores | Asrock B550M Steel Legend | 3060 | 2x 16gb Micron E 2666 @ 4200mhz cl16 | 500gb WD SN750 | 12 TB HDD | Deepcool Gammax 400 w/ 2 delta 4000rpm push pull | Antec Neo Eco Zen 500w

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, SupaKomputa said:

Does the format of the domain matter? If so, how should i name it for a local network?

No, but for non conflicting sake, you can use like .local or .home or what ever unique from the rest of the internet.

 

Does the ip of the domain have an impact if it's a lan one?

The ip of the domain should be static, if the ip is changing (like using DHCP), it won't be resolved.

You should set a static IP address for the server and link the IP and domain in the dns server.

The ips are static.

6 minutes ago, mariushm said:

A bit off topic but make sure your browsers don't default to DNS-over-HTTPS ... see :  https://support.mozilla.org/en-US/kb/firefox-dns-over-https

 

Can i do a workaround with this? like change the ip of my dns server from 53 to 443?

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, qxZap said:

Can i do a workaround with this? like change the ip of my dns server from 53 to 443?

53 is not an ip address, it's a default dns tcp / udp port, you shouldn't change it.

443 is standard port for SSL, again leave it be.

Ryzen 5700g @ 4.4ghz all cores | Asrock B550M Steel Legend | 3060 | 2x 16gb Micron E 2666 @ 4200mhz cl16 | 500gb WD SN750 | 12 TB HDD | Deepcool Gammax 400 w/ 2 delta 4000rpm push pull | Antec Neo Eco Zen 500w

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, SupaKomputa said:

53 is not an ip address, it's a default dns tcp / udp port, you shouldn't change it.

443 is standard port for SSL, again leave it be.

Sorry. Meant port :D it's been a long vacantion

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, qxZap said:

Sorry. Meant port :D it's been a long vacantion

You'd have to listen on the proper port, and support SSL - encryption and decryption - (maybe using openssl) and the minimums required for that dns-over-https

 

Here's a client and server implementation in Golang https://github.com/m13253/dns-over-https

 

And just a client - again, in Golang : https://github.com/likexian/doh-go

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/4/2021 at 4:51 PM, mariushm said:

You'd have to listen on the proper port, and support SSL - encryption and decryption - (maybe using openssl) and the minimums required for that dns-over-https

 

Here's a client and server implementation in Golang https://github.com/m13253/dns-over-https

 

And just a client - again, in Golang : https://github.com/likexian/doh-go

 

Thanks a lot. I will try with that.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×