Resizing my LVM based virtual disk

So I needed to upgrade my mail server but realized I only had 5GB of space left on the /opt partition and the upgrade complained about needing more than 5GB.  Not sure why I didn’t size the whole virtual disk a little bigger in the first place.  Also not sure why I didn’t set Zabbix to warn me when the disk space got that low.  Hindsight and all of that.  So following other’s recipes this is how I resized my LVM based virtual disk, and then subsequently resized the partitions within the VM.

Read more

Changing the MAC address / network name in Ubuntu/Debian

This one always gets me. With Debian & Ubuntu  I can never remember the @^!*% file that lists the association between the MAC address and the interface name (eth0, eth1, etc.).  If there is only one NIC, then it’s not a big deal, but with my servers with multiple NICs then my OCD kicks in and I like to have my ports in a nice orderly fashion.  For example, if I have three NICs in a server where one is the going to be the primary NIC, and then the other two are for LACP for storage, etc. then I like to make eth0 my primary and eth1/2 my bonded interface. Read more

Sony VAIO, Linux Mint, and a (missing) wireless switch

I am the proud new owner of a Sony VAIO S-series laptop (model# SVS151190X), running Linux Mint 13 (Maya).  Everything installed beautifully and all hardware was found.  That was a first for me and a new laptop, probably a testament to the hard work of the Linux devs.  Also very glad to be done with my MacBook Pro.  Anyhoo, I recently disabled the wireless from the network manager menu (right-click, uncheck ‘Enable Wireless’).  When I went to re-enable it it was grayed out and I couldn’t re-enable the wireless.

Read more

Wireshark for non-root users

Nothing Earth-shattering here, but this one always trips me up and I spend 10-15 minutes trying to remember how to set it up so that I can wireshark as a non-root user.  Works like a charm under Ubuntu, Xubuntu, and Debian 6.x.  Prolly works under all Deb derivatives, but I won’t stake my career on that 🙂

Anyhoo, here is the code:

sudo setcap cap_net_raw=+ep /usr/bin/dumpcap

Sweet! Props to the folks on the Ubuntu forums: http://ubuntuforums.org/showthread.php?t=1086288

Automagic Bridged Networking Under *Ubuntu (and maybe Debian?)

I use Virtualbox for all of my virtual machining needs.  For some of my guest vms I like to use “host” networking, meaning that essentially the vm will share the hosts network adapter using a bridge and a TAP interface on the host computer to perform its virtual networking magic.  However, it can be a little more tricky to setup than using Virtualbox’s other type of networking, NAT.

However, with two packages “bridge-utils” and “uml-utilities” the chore of setting up a bridge interface on Ubuntu (and maybe even Debian) is almost pain free. Read more

Ubuntu and mount.cifs

Using SMB/CIFS under Nautilus was too slow. For Windows shares that I use regularly I figured it would be faster and easier to have the share mounted permanently as part of the file system. This also has the benefit of all Linux programs being able to access the files, not just Gnome based apps. Here is how I mounted a R/W Windows share under Linux. Read more

Installing pfSense on the alix2c1

So, what is pfSense, and more importantly what the heck is an alix2c1? pfSense is a complete purpose-built firewall software that can be installed on a PC, as well as embedded platforms such as PC Engines ALIX boards. The focus of this recipe is to build an embedded firewall appliance. Why would I do this when a cheap firewall can be purchased off of the shelf? Simple, the cheaper firewalls don’t come with very many features (VPN built in, RRD network graphs, 3rd LAN port for “orange” DMZ setups, etc.). To get these features in a commercial firewall appliance means spending in the neighborhood of $300 as well as being locked into a certain vendor for VPN, etc. Making my own costs about $150 and give me a lot of flexibility.

So, this is a story of how I spent the past two nights sitting cross-legged on the floor with a laptop connected to a tiny motherboard that would become a firewall/router. Read more