Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a database server running Ubuntu 12.04. The db server is connected to a load-balancer(HAProxy) on a LAN network and the LB is connected to the internet. So the db server has no direct internet connection. I connect to the db server by SSHing through the load-balancer.

Is there a good way to install updates on the database-server eventhough it doesn't have a direct connection to the internet?

share|improve this question
up vote 1 down vote accepted

You can install and use Apt-Cacher NG on your load-balancer (or another box that is accessible to both networks) and configure apt to use that as a proxy.

To install Apt-Cacher NG:

sudo apt-get install apt-cacher-ng

To configure an apt proxy, create a file at /etc/apt/apt.conf.d/02proxy with this contents (replace the IP with your load-balancer's IP as it appears to your database servers):

Acquire::http::Proxy "";

Apt-Cacher NG will act as a caching proxy and will only cache packages that have been requested, so it's a lot neater (and more transparent) than running your own repository.

You can tweak/configure it using the /etc/apt-cacher-ng/acng.conf file but the default configuration will work for the majority of cases.

share|improve this answer
Note that the default apt-cacher-ng port is 3142. Other than that, thank you Craig! – dotancohen Oct 9 '13 at 8:47

You can create you own repository server and setup new repository server path on your DB servers and than you can apply update on your servers with no internet connection.

Note:- Your Repository server should be in LAN.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.