lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
746 stars 75 forks source link

Clients on windows domain, DNS priority #69

Closed ptepartz closed 4 years ago

ptepartz commented 4 years ago

Describe the issue you are having

We have a gaming cafe with 20+ PC's all with steam, blizzard, origin etc installed. We have the monolithic cache setup on a VM using our Synology NAS for storage. Everything was running fine until we decided to set the PC's up on local domain using windows server 2016 which is being run on another VM hosted on the same computer the monolithic cache is running on.

We started to notice problems when we added the second DNS to the PC's. If the Windows server DNS isn't 1st priority then client will disconnect itself from the domain. If the monolithic cache isn't 1st priority on the PC when downloading a game from the cache it will switch between pulling from the internet and pulling from the cache. It stops and starts for extended periods of time, something that it does not do when the monolithic cache IP is first priority.

I'm self taught so I am having a hard time troubleshooting this and have found myself lost in google for hours, if there is a straight forward solution that someone knows about I would love to hear it. If anyone can give me a hand on this I would greatly appreciate it as I am almost at the end of a very long rope.

How are you running the container(s)?

Standard configuration as per setup instructions on a hyper-v running Ubuntu 18.04.3 LTS.

Cheers!

unspec commented 4 years ago

The easiest way to fix this is probably to upstream one of them to the other, rather than trying to get the clients to query both.

So for example you could set your clients to query your domain controller for DNS and have that upstream to lancache-dns (see something like https://technogecko.net/msft/how-to-add-dns-forwarders-in-windows-server-dns/ for how to set a forwarder in windows DNS server - put the IP of your lancache-dns as the IP). That way the domain controller can answer DNS requests for your active directory domain and then pass everything else onto lancache-dns.

You could do it the other way around too (have the clients talk to lancache and have that upstream to the windows box).

ptepartz commented 4 years ago

The easiest way to fix this is probably to upstream one of them to the other, rather than trying to get the clients to query both.

So for example you could set your clients to query your domain controller for DNS and have that upstream to lancache-dns (see something like https://technogecko.net/msft/how-to-add-dns-forwarders-in-windows-server-dns/ for how to set a forwarder in windows DNS server - put the IP of your lancache-dns as the IP). That way the domain controller can answer DNS requests for your active directory domain and then pass everything else onto lancache-dns.

You could do it the other way around too (have the clients talk to lancache and have that upstream to the windows box).

Thanks unspec! I'll try this out when I go into work this afternoon and post back here with my results :)

teehzero commented 4 years ago

I'm interested in hearing how this worked out for you because I'm going to be in a similar boat soon.

MathewBurnett commented 4 years ago

As a simple analogy of you network lets consider my home.

Therefore I hand out my lancache dns to all dhcp clients in my network. I then have my lancache dns use my router as its upstream (rather than 8.8.8.8 etc). The result is that game domains are intercepted by the cache but if i try a local host in my network then it passes on that and allows my router to answer.

This is not the most adult way to manage dns but it is straight forward if you need to do things with dns in your network. For extra marks you can use something like dnsmasq with strict-order set to point to lancache first (with your other dns as upstream) and your main dns as the second request. This allows me to turn off my lancache without tears.

unspec commented 4 years ago

I've labelled for future reference, and closing for now as no ongoing issue. Feel free to reopen for more advise if needed.