Skip to content

Instantly share code, notes, and snippets.

View obrodinho's full-sized avatar

Rafael "Brodinho" Guimarães obrodinho

View GitHub Profile
@obrodinho
obrodinho / README.md
Created February 10, 2016 23:14 — forked from magnetikonline/README.md
Using Dnsmasq with Ubuntu 14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@obrodinho
obrodinho / README.md
Last active April 17, 2016 17:40 — forked from fjmk/README.md
Howto use dnsdock in Ubuntu 14.04 trusty

Howto use dnsdock in Ubuntu 14.04 trusty

Using dnsdock resolves the problem of the changing IP's of containers. It is much easier to start a named container and use dns on the host to access the container simply by its name.

patch your /etc/ files so NetworkManager's dnsmasq to use the dnsdock nameserver.

sudo su -
cd
wget https://gist.githubusercontent.com/rguimaraens/6b9e57673170dff76ad4/raw/c2e799aca9593fe735d11845606dc9753ff86db7/etc-dnsdock.patch
cd /etc