-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confused about virtual interfaces #142
Comments
This is mainly due to listening on these 18 open ip addresses for each
seperate services like steam assigned to one; battle.net assigned to the
next and so forth...
You could do this on one ip but this increases the complexity of the
configuration hugely and the chances of missing a DNS name are higher and
more likely as you have to define each seperately...
Op do 21 feb. 2019 om 02:48 schreef Kyle Barr <notifications@github.com>:
… Are the interfaces in this file the "virtual interfaces" that are
mentioned in step 5?
https://github.com/bntjah/lancache/blob/master/interfaces
And are these interfaces where we need 18 open ip addresses on the subnet?
I'm just a little confused why each platform needs it's own network
interface.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#142>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGE_0a9Oy3wgF9l7fYKL8y1DVjuxeJ9Jks5vPfrygaJpZM4bGejF>
.
|
So I'm still missing the point of them. Like what devices/systems are using these virtual IPs and how? Are the virtual IPs exposed to the network in such a way that, say a computer wants to download from steam, it would need to use the Steam virtual interface IP (say 10.1.0.120)? If this is the case, then assuming the actual lancache server is on 10.1.0.110 for it's physical IP, are the computers still only connecting to 10.1.0.110, 8.8.8.8, and 8.8.4.4 for DNS, or do we need to put the lancache IP, the 18 virtual IPs, and then google's IPs down for DNS? |
This would be one to look at why it needs more then one IP address |
So they're saying there that, for example, if 2-4 people on the network were to download from 10.1.0.110, it would probably download at max speed, but the moment you do 8, 10, 20 etc., each one progressively gets slower? Therefore, if steam had, say, 10 IPs, then downloading to 20-40 PCs (obviously limited by harddisk read speeds), then it would work? Sorry if I'm asking a dumb question but it's really unclear to me why each provider needs it's own IP. It's only for connections in the network (computers connecting to the lancache for downloads) and has nothing to do with the lancache downloading from the internet, right? Edit: It's also unclear how this will be handled from the computers' POV. Are we adding all 20+ IP addresses to their DNS settings? How does that work? |
It doesn't help with speed because all of the IPs are on the same network connection. It's because each provider has a slightly different configuration, and there needs to be some way to know what to use. Think of them as languages: say your battle.net client tried to talk to the virtual IP used by steam. Your client starts "talking battle.net," and lancache doesn't understand it, because it can only speak steam on that IP. There is a way to have only a single IP address and have all of the providers share it, but you have to do custom stuff so that lancache knows which config to use for each request, and there's more that can go wrong. Think of it like a call center. It's a lot easier to publish a phone number for English, and a phone number for Spanish, and a phone number for French. The alternative would be a single phone number, with a menu of "Press 1 for English," etc. (Not a perfect analogy, but hopefully it helps.) |
Okay, great, I understand that, but that still doesn't answer my question of: Do I need to add ALL of these IPs to the DNS settings of each PC? We can define them in the router and it'll automatically update, but how do we tell the computers, "Okay! Steam is on 10.1.0.120!" I guess in a broader sense: I'm fine with assigning the IPs in the Interface, but is there any other configuration required? |
The only IP that you want to put into the DNS settings of each PC is the main lancache IP. (Or have DHCP hand it out.) |
So you're saying that when a computer hits the lancache IP, the lancache will automatically route the traffic to a different virtual interface, and that there's no other setup required. Yes or no? |
Not an entirely, its more like the computer checks the dns wich has been
configured by dhcp or manually set to route certain domains towards the
correct lancache virtual interfaces wich from there sent it to the right
part of the cache.
To either download it from cache or get it from the upstream and cache it
at the same time...
Op do 21 feb. 2019 om 21:36 schreef Kyle Barr <notifications@github.com>:
… The only IP that you want to put into the DNS settings of each PC is the
main lancache IP. (Or have DHCP hand it out.)
So you're saying that when a computer hits the lancache IP, the lancache
will automatically route the traffic to a different virtual interface, and
that there's no other setup required. Yes or no?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGE_0e0Uk1VbJ_YVgq1_4T_ojZHK9gKSks5vPwNjgaJpZM4bGejF>
.
|
Sorry if I'm coming off rude, but you're not answering my question. I just want to make sure I know exactly what is going on before I go assign 18 random IPs on the network. "...or manually set to route certain domains towards the correct lancache virtual interfaces..." So by saying this, you're saying that I need to, either by DHCP or manually, set ALL the IPs to DHCP. So in other words, there will be:
So 20 IPs set in the PC's DNS settings. Then you say, "...wich from there sent it to the right part of the cache. To either download it from cache or get it from the upstream and cache it at the same time..." How does the computer, in this case, know where to request the right download from? brgerig said you only need to put in the lancache IP, but reading what you say makes me question that. What I can only assume is the actual way it works is that when a PC hits the lancache IP, lancache will see what TLD the request is to and then somehow route the traffic to the correct virtual interface, which at that point, once the virtual interface receives that request, it will pipe the data to the PC. Is that right? Edit: I also want to clarify, when you say computer, I assume you mean the gaming PC, NOT the lancache. The lancache I would say is the server. |
No, you only need the primary Lancache IP in the gaming PC's DNS. There isn't any IP routing going on, just DNS hijacking. Here's how it works: Let's say you visit CNN on the PC. Computer needs to know what IP address to use for www.cnn.com, so it asks Lancache IP via DNS. Lancache looks at DNS config, doesn't have any info for www.cnn.com, so asks its upstream DNS (google) for the answer, then gives it to the PC. Then your PC happily goes and visits www.cnn.com on that address. Now your PC wants to download a steam game. It asks Lancache IP what IP address to use for content2.steampowered.com. Lancache looks at its DNS config, and sees that content2.steampowered.com is in its special DNS config, so it tells the PC that domain name is at 10.1.0.120. Your PC then asks 10.1.0.120 for the files it wants to download from content2.steampowered.com. Lancache web server is listening there and proxying+caching any downloads that get requested. Does that help clarify things? |
So brgerig has the best explanation so far that is most user friendly. I
forget from time to time that not everybody is on the same lines all the
time.
Big thanks to @brgerig for this!
Op ma 25 feb. 2019 om 15:11 schreef brgerig <notifications@github.com>:
… No, you *only* need the primary Lancache IP in the gaming PC's DNS. There
isn't any IP routing going on, just DNS hijacking. Here's how it works:
Let's say you visit CNN on the PC. Computer needs to know what IP address
to use for www.cnn.com, so it asks Lancache IP via DNS. Lancache looks at
DNS config, doesn't have any info for www.cnn.com, so asks its upstream
DNS (google) for the answer, then gives it to the PC. Then your PC happily
goes and visits www.cnn.com on that address.
Now your PC wants to download a steam game. It asks Lancache IP what IP
address to use for content2.steampowered.com. Lancache looks at its DNS
config, and sees that content2.steampowered.com is in its special DNS
config, so it tells the PC that domain name is at 10.1.0.120. Your PC then
asks 10.1.0.120 for the files it wants to download from
content2.steampowered.com. Lancache web server is listening there and
proxying+caching any downloads that get requested.
Does that help clarify things?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGE_0VysyNleU9mOu9c3puLtU3Bi3EmJks5vQ-77gaJpZM4bGejF>
.
|
the truth is you have to understand many concepts for lancache... unbound,
dhcp, nginx, hosts
Not so easy, even if you know what you're doing
Le mar. 26 févr. 2019 à 11:38, Geoffrey <notifications@github.com> a écrit :
… So brgerig has the best explanation so far that is most user friendly. I
forget from time to time that not everybody is on the same lines all the
time.
Big thanks to @brgerig for this!
Op ma 25 feb. 2019 om 15:11 schreef brgerig ***@***.***>:
> No, you *only* need the primary Lancache IP in the gaming PC's DNS. There
> isn't any IP routing going on, just DNS hijacking. Here's how it works:
>
> Let's say you visit CNN on the PC. Computer needs to know what IP address
> to use for www.cnn.com, so it asks Lancache IP via DNS. Lancache looks
at
> DNS config, doesn't have any info for www.cnn.com, so asks its upstream
> DNS (google) for the answer, then gives it to the PC. Then your PC
happily
> goes and visits www.cnn.com on that address.
>
> Now your PC wants to download a steam game. It asks Lancache IP what IP
> address to use for content2.steampowered.com. Lancache looks at its DNS
> config, and sees that content2.steampowered.com is in its special DNS
> config, so it tells the PC that domain name is at 10.1.0.120. Your PC
then
> asks 10.1.0.120 for the files it wants to download from
> content2.steampowered.com. Lancache web server is listening there and
> proxying+caching any downloads that get requested.
>
> Does that help clarify things?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#142 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AGE_0VysyNleU9mOu9c3puLtU3Bi3EmJks5vQ-77gaJpZM4bGejF
>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASWSQOfQagg5T_hcEJcumDnQMBfuEPUEks5vROSBgaJpZM4bGejF>
.
|
Happy to help! |
Hey again, sorry for coming off rude. So I think I'm getting it. We only need to set 1 IP to our local network, and then using localhost (127.x.x.x) IPs on the actual server, it will act as a DNS server and route to the other localhost IPs? In that case, what do I need to fill out for these entries?
|
Hey guys, back again. I nuked the server and started from scratch. I was very deliberate and concise with the instructions and everything. It still isn't working. It appears that having only our lancache @ 10.1.0.110 set as DNS for a PC, it is still able to download games, but it can't access the internet. This is expected, but it isn't actually sending traffic through the lancache to be cached. It looks like it's just hopping over it completely. What do I do from here? |
Okay. so I was able to use this command and now I am at least able to redirect traffic using the lancache as a DNS server. I can get on this github, google, and download with steam: I got it from here: #89 (comment) I guess in the install instructions, it doesn't set So now we are making progress, but I am unable to still download through the lancache. I'll upload my configs shortly. |
Looks like there were some duplicate local-zones in unbound that prevented the localzones from mounting. So now my traffic is still redirected, and now steam is giving an error that it can't connect. So there's some progress. Now I guess it's something with the proxying/nginx? |
if you can try this installer and if you still have some issues I may be able to use teamviewer to help out next week some time. |
I had tried that installer twice before and it didn't work at all.
…On Tue, Apr 9, 2019, 3:07 PM nexusofdoom ***@***.***> wrote:
if you can try this installer
https://github.com/nexusofdoom/lancache-installer
and let know how it goes?
and if you still have some issues I may be able to use teamviewer to help
out next week some time.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHivWTy3UQ2gQ1w5s6klilJjp81PVFH9ks5vfQEcgaJpZM4bGejF>
.
|
I just redid my server this weekend and it worked with no issues. Installer for the lancache by Nexusofdoom, Zero Ping Heroes and Geoffrey Improve download speeds and reduce strain on your Internet connection at LAN parties. Locally cache game installs and updates from the largest distributors. Ubuntu 18.04.1 with OpenSSH Server. You will need 18 avaliable IP's example 192.168.0.2 - 192.168.0.20 used for lancache cd lancache-installer Run scripts with sudo ########################################################################## To access netdata open broswer and navigate to http://your-primary-ip:19999 ########################################################################## |
Alright, I installed it with 18.04.1, but the IPs were what I wanted, so I modified the What else do I need to modify to get this working. |
Use your DHCP server to hand out the first IP you want to use to the MAC address of the network interface you are using. then when you run the installer it will auto setup the IP's starting from the first address your DHCP Server handed out. if you want to edit the IP's by hand you will need to edit more then the /etc/netplan/01-netcfg.yaml file. |
example of the 01-netcfg.yaml file |
you would also need to edit the /etc/hosts file 127.0.0.1 localhost 127.1.0.1 lancache-origin-backend 10.0.4.30 lancache-eth #The Following are Virtual IP's used by Lancache |
you would also need to edit the unbound.conf also |
Cool. So I changed all three of those files. It is redirecting traffic like before, but now instead of (manifest missing) for steam, I get (no internet connection). Here's the files: 01-netcfg.yaml
/etc/hosts
And then the unbound was updated accordingly. Is there anything else I need to change? |
Ah my bad, forgot the vhosts. Just a moment |
one thing on the windows client may have to run a admin command prompt and flush the dns "ipconfig /flushdns" then you can also try and ping one of the lancache services from the windows client and see if it shows a reply from the local IPs you have setup. |
should also see if all the services are running nginx, unbound, and sniproxy. |
Woohoo! I updated the vhosts and then the netdata.conf to the new 10.1.0.110 ip and it works! Thanks @nexusofdoom. Sorry if I was getting aggravated at some points. I just really needed this to work and it was a huge learning curve for me. Is there any chance we can get a script to automatically update the IPs in the future? |
I know at one point we did look at that. |
Your welcome any time. |
Are the interfaces in this file the "virtual interfaces" that are mentioned in step 5? https://github.com/bntjah/lancache/blob/master/interfaces
And are these interfaces where we need 18 open ip addresses on the subnet? I'm just a little confused why each platform needs it's own network interface.
The text was updated successfully, but these errors were encountered: