Using a (host) reverse-proxy together with LXC application servers

The basic idea is to move application servers into LXC containers while keeping the HTTP server part (which is also responsible for hosting static files) on the host system. Normally an incoming request would be handled by an HTTP server on the host as well as by an HTTP server on the virtualized client: browser -> http server(host) -> http server (guest) -> app-server (guest) I’m configuring the host HTTP server to directly communicate with the app worker, thus: ...

April 25, 2014 · 2 min · 407 words · Andreas Happe

How to convert an KVM image into a LXC container

KVM was an improvement over Xen for me. Still for many use-cases a LXC are a more performance, light-weight alternative – which also seems to be en vougue nowadays. Through switching to LXC I’ve reduced my overall memory usage a bit – the main benefit is, that processes within an LXC container are separated processes within the host system. This should allow the host system to manage memory (think cache, buffers, swap, etc.) more efficiently. ...

April 7, 2014 · 5 min · 888 words · Andreas Happe

How to use virt-install to install new virtual machines within libvirt/kvm

I’ve been using KVM and virt-install to manage virtual machines on one of my servers, this post shows how to use virt-install. According to the package management system I’m having the following packages installed: root@edgewalker ~ # dpkg -l | grep virt ii libvirt-bin 1.1.1-0ubuntu8.1 amd64 programs for the libvirt library ii libvirt0 1.1.1-0ubuntu8.1 amd64 library for interfacing with different virtualization systems ii munin-libvirt-plugins 0.0.6-1 all Munin plugins using libvirt ii openvpn 2.3.2-4ubuntu1 amd64 virtual private network daemon ii python-libvirt 1.1.1-0ubuntu8.1 amd64 libvirt Python bindings ii qemu-kvm 1.5.0+dfsg-3ubuntu5 amd64 QEMU Full virtualization on x86 hardware (transitional package) ii virt-top 1.0.7-1 amd64 show stats of virtualized domains ii virtinst 0.600.4-2ubuntu2.1 all Programs to create and clone virtual machines Storage-wise I’m using a LVM volume group called ‘vg0’ (which was imported into the libvirt configuration). ...

March 22, 2014 · 2 min · 290 words · Andreas Happe

Linux: How to force an application to use a given VPN tunnel

I’ve changed my approach and am now using a simple docker setup to achieve the same result Somehow I have to use VPN services throughout the day: when pen-testing from abroads I really need to login to my company’s network first. Otherwise my provider is kinda grumpy when I’m doing fast non-cloaked scans against large companies. also when pen-testing I like to use some cloaking VPNs to test the client’s detection capabilities if I would ever use bit-torrent I’d really like to make sure that the torrent program can only communicate through a private proxy (as pia). The easy solution would be to connect the openvpn tunnels on startup and just route all the traffic through the tunnels. Alas this is way to slow for daily use – and somehow error prone: if a tunnel dies and some pen-test is currently under progress traffic might escape into ‘unsecured’ public networks. The same would be true for torrents. ...

October 20, 2013 · 4 min · 845 words · Andreas Happe