Computing › Linux & Open Source

Entries feed - Comments feed

Friday, April 26 2013

Prepare RedHat / CentOS for Cloning

To prepare a RHEL/CentOS/etc host for cloning (eg, duplicating a Virtual Machine or creating a VM Template), use the following commands as the last steps:

touch /.unconfigured
rm -f /etc/ssh/ssh_host_*
ifdown eth0
sed -i '/^HWADDR=.*$/d' /etc/sysconfig/network-scripts/ifcfg-eth0
ifup eth0
rm -f /etc/udev/rules.d/70-persistent-net.rules
shutdown -h now

Source: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Evaluation_Guide/Evaluation_Guide-Create_RHEL_Template.html

Saturday, May 26 2012

Installing ipset on CentOS 6

I assume this will work on RedHat 6 too:

# yum install http://people.redhat.com/twoerner/BZ/477115/ipset-6.7-2.el6.x86_64.rpm http://people.redhat.com/twoerner/BZ/477115/libmnl-1.0.1-1.el6.x86_64.rpm http://people.redhat.com/twoerner/BZ/477115/libmnl-devel-1.0.1-1.el6.x86_64.rpm

Yes, you can copy and paste.

Note that this isn't adding any repositories, so I'm not sure what impact this will have in future since the packages won't get automatically updated by `yum update` (security updates, breakage when kernel updates etc?)

Tuesday, October 19 2010

Custom Actions with fail2ban

Most people are familiar with the fail2ban package available for protecting against brute-force password attacks against your servers.

Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address.

What you might not have experimented with is it's ability to execute custom actions instead (or as well as) blocking the source IP in iptables.

Continue reading...

Tuesday, March 16 2010

CentOS Installation without VGA Console

So I've spent the last day and a half, plus around $20 worth of DVD's, trying to get the CentOS Installer to boot and install on a headless machine. Here's the end result...

Continue reading...

Saturday, January 30 2010

Migrating Physical Machine to Virtual Machine

This a quick step-by-step for migrating a Physical computer to a Virtual Box instance. It was written for an Arch Linux based installation, and requires no special software except for an Arch Linux installation CD / ISO image.

Continue reading...

Monday, January 4 2010

bind 'blackhole' option prevents *all* traffic

So, what's wrong with this named.conf file?

Continue reading...

Monday, November 2 2009

Adding Swatch Internet Time to Gnome

How to add an applet to your Gnome panel displaying Swatch Internet Time

Continue reading...

Thursday, January 8 2009

OpenVPN MTU Size

I came across a problem recently while attempting to transfer a largish (23mb) file from my web server to my file server via my OpenVPN tunnel.

The tunnel has been working perfectly since it was first established. SSH and small file copies went fine. But this copy would get to 2,112kb and then stall. No matter how many times I attempted it. I attempted the same transfer using the public interwebs (I was scp'ing so it was encrypted anyway) and this worked perfectly, so there was obviously a problem with the OpenVPN tunnel.

Continue reading...