# Using bind to cache steam and other downloads via nginx



## Yasser (May 31, 2017)

Hi, im a noob in caching and i have question about how to use bind to respond to nginx cache, how do i configure a bind to listen to nginx,  i have seen some examples of bind configs but i cant figure out how to work.


----------



## SirDice (May 31, 2017)

Erm,  BIND is used for DNS name resolving, it has absolutely nothing to do with serving web content. Please explain exactly what you want to do.


----------



## Yasser (May 31, 2017)

SirDice said:


> Erm,  BIND is used for DNS name resolving, it has absolutely nothing to do with serving web content. Please explain exactly what you want to do.


I want to do a lancache server for my games on steam, but all I could find is some references to nginx with bind to make it work, I don't know if I could link the Github in here.


----------



## SirDice (May 31, 2017)

By all means, if you have a link to the document you're following, please post it.


----------



## Yasser (May 31, 2017)

SirDice said:


> By all means, if you have a link to the document you're following, please post it.


http://blog.multiplay.co.uk/2014/04/lancache-dynamically-caching-game-installs-at-lans-using-nginx/
This site is using freebsd to cache all games, but they say it needs dns resolving pointing to nginx and the only thing i found about dns resolver is bind, im trying to configure it to point to the nginx lancache but i cant figure out how.
Ps: Sorry for broken english.


----------



## SirDice (May 31, 2017)

Ah, the "trick" they're using is to set up BIND in such a way that if your computer, for example, tries to connect to cs.steampowered.com, instead of resolving it to the actual, real, internet IP address, it resolves to the IP address of your local nginx. So you're basically tricking your Steam client to connect to your nginx instance instead of the "real" address.

Instead of BIND I would suggest using dns/unbound as it's a lot easier to create those "fake" entries. BIND can be a bit of a pain to set up, especially if you've never done anything like this before.


----------



## Yasser (May 31, 2017)

SirDice said:


> Ah, the "trick" they're using is to set up BIND in such a way that if your computer, for example, tries to connect to cs.steampowered.com, instead of resolving it to the actual, real, internet IP address, it resolves to the IP address of your local nginx. So you're basically tricking your Steam client to connect to your nginx instance instead of the "real" address.
> 
> Instead of BIND I would suggest using dns/unbound as it's a lot easier to create those "fake" entries. BIND can be a bit of a pain to set up, especially if you've never done anything like this before.


Thank you very much, ill look into it.


----------

