Posts Categorized: red hat centos

Pxeboot CentOS Environment

Organised Chaos

While re-purposing a few old Google Search Appliances I set up a Network Boot Enviornment as follows: Install Dependencies

Configure tftp

Change tftp Permissions

Copy the Boot Files and DVD Files

Next I copied ISO files for CentOS distributions to the machine and mounted them loopback to retrieve… Read more »

Compiling Dansguardian with Increased MaxChildren

squid

I have three main proxy servers running Squid, Squidguard and DansGuardian servicing over 1300 desktop computers. The stock DansGuardian code includes a setting to limit the number of potential DansGuardian child processes to the operating system file descriptor limits. I have managed to increase this to 900 but would like to push it further. The setting… Read more »

Radius with LDAP Authentication

The notes here are a quick howto for using LDAP authentication against Active Directory. It is possible to use Samba/Winbind/Kerberos authentication within Radius too and I may post those notes when I get a chance but for now this is how I implemented it with LDAP. Install required software on CentOS/Red Hat:

Edit the… Read more »

proftpd Unable to open config file: /etc/security/pam_env.conf

Although it wasn’t causing any problems I wanted to stop proftpd logging these lines:

Many other people also appear to have the same problem. The solution appears to be to edit the file /etc/pam.d/proftpd and change the contents from:

TO

Hope this helps someone else.

Minecraft Server on CentOS 6

I downloaded the minecraft server package and extracted it to /opt/minecraft I installed screen and Java (OpenJDK) using yum as follows:

The SysV init startup scripts provided on the Wiki didn’t work for me so I cobbled the following together which works for me. Anyone else wishing to use this should set the variables… Read more »

IPTables Custom Chain for SSH access

I wanted a custom IPTables firewall chain to allow SSH access to a machine. The idea is that users hit a web page that adds their dynamic IP address to a list and then a script inserts that IP address into IPTables to allow SSH access. I achieved this as follows. In /etc/sysconfig/iptables I added:

Read more »

ProFTPd CentOS 6: PAM unable to dlopen /lib64/security/pam_stack.so

Installed ProFTPd on CentOS 6 and found that users could not log in. The proftpd logs showed: USER jonny (Login failed): Incorrect password. The /var/log/secure log showed: proftpd: PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory The solution is to replace the /etc/pam.d/proftpd file with the following (as… Read more »

BIND on CentOS 5

The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi /etc/yum.repos.d/centalt.repo And add the following to it: [CentALT] name=CentALT Packages for Enterprise Linux 5 –… Read more »

Apache GeoIP Country Detection

Creating customised content based on the origin country of your website visitors requires installing the mod_geoip module for Apache and also the MaxMind GeoIP database as follows (on CentOS): mkdir ~/geoip cd  ~/geoip wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz tar xzf GeoIP* cd GeoIP* ./configure make make check make install cd .. wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz tar xzf mod_geoip2_1.2.5.tar.gz cd mod_geoip2_1.2.5… Read more »

Creating a Yum Repository

Armed with a few RPMs I need to install on multiple machines and sick of SCP’ing files around machines I decided to set up a Yum repository. Here’s how: On a machine that already has Apache running and serving content: yum install createrepo cd /var/www/html/centos/5/qub/x86_64 createrepo /var/www/html/centos/5/qub/x86_64 Then on each client machine aiming to use… Read more »