Wednesday, December 30, 2009

Setting Up VRRP on Netgear Managed L3 Switches

Preliminary steps

1. Make sure your two switches are connected together, preferably via port-channels (lag)

2. make sure the VLANs you want to apply VRRP to are enabled on the port channels so that they span both switches



Configuration

In this example, we'll create a new routing VLAN (VLAN 15 for this example) on two switches, switch-a and switch-b. The primary ip will be 192.168.211.1, and the secondary will be 192.168.211.2. the VRID for the VRRP will be 15 (for convenience - but not strictly necessary. VRID 1 would work as well, I just find it easier to name it after the vlan.) The virtual IP will be 192.168.211.254.

Master switch

1. log into switch-a

2. enable

3.

vlan database
vlan 15
vlan routing 15
exit

4.

configure
ip routing
ip vrrp
interface vlan 15
ip address 192.168.211.1 255.255.255.0
ip vrrp 15
ip vrrp 15 ip 192.168.211.254
ip vrrp 15 preempt
ip vrrpt 15 authentication simple my_pass
ip vrrp 15 mode (enables vrrp on this interface)
exit
exit

5. verify that VRRP 15 is behaving correctly:

sh ip vrrp interface vlan 15 15
Primary IP Address............................. 192.168.211.254
VMAC Address................................... 00:00:5e:00:01:50
Authentication Type............................ None
Priority....................................... 100
Advertisement Interval (secs).................. 1
Pre-empt Mode.................................. Enable
Administrative Mode............................ Enable
State.......................................... Master

Backup Switch

1. log into switch-b

2. enable

3. enter the following commands:

vlan database
vlan 30
vlan routing 30
exit

4.

configure
ip routing
ip vrrp
interface vlan 15
ip address 192.168.211.2 255.255.255.0
ip vrrp 15
ip vrrp 15 ip 192.168.211.254
ip vrrp 15 priority 1 (makes this a secondary - it defaults to 100)
ip vrrp 15 preempt
ip vrrpt 15 authentication simple my_pass
ip vrrp 15 mode (enables vrrp on this interface)
exit
exit

5. verify that VRRP is working correctly

sh ip vrrp interface vlan 15 15
sh ip vrrp interface vlan 15 15
Primary IP Address............................. 192.168.211.254
VMAC Address................................... 00:00:5e:00:01:50
Authentication Type............................ None
Priority....................................... 1
Advertisement Interval (secs).................. 1
Pre-empt Mode.................................. Enable
Administrative Mode............................ Enable
State.......................................... Backup

Wednesday, November 18, 2009

Automount Home Directories Over NFS in Linux

On RedHat Enterprise/CentOS...
assuming your home server is called "fs1" and is sharing out /home over NFS. You'll also want to make sure that both your home directory server and the server you're running autofs on has the same passwd/user info - ids, gids.

1. Make sure autofs is installed and running:

sudo chkconfig autofs on
sudo service autofs start

2. add "/home /etc/auto.home" to /etc/auto.master

3. create the file /etc/auto.home and add these lines:

* -fstype=nfs,rw,nosuid,soft fs1:/home/&

4. if you already have a /home dir, move it out of the way:

sudo mv /home /home.old

5. reload autofs

sudo service autofs reload

6. ls /home

You should see the users' home directories.

Wednesday, October 14, 2009

Building Bacula Client RPMs for CentOS 5.x

This is a quick and dirty explanation of the process. I'm building as root - which you should probably avoid doing.

Download and install the srpm file from bacula's site (sudo rpm -ivh name-of-srpm.srpm)

You'll need to install the rpmbuild utility:



sudo yum -y install rpm-build


To build the client only:

Install a couple of prerequisite rpms:
sudo yum -y install ncurses-devel libtermcap-devel

rpmbuild --define build_client_only=1 --define build_centos5=1 -bb /usr/src/redhat/SPECS/bacula.spec

Saturday, September 26, 2009

Cisco ASA VPN and RSA SecurID Appliance

I recently set up an RSA SecurID Appliance as a authentication source for a Cisco ASA 5510 running 8.0.x firmware. The basic setup of the box was pretty straightforward. It runs a stripped down Linux distribution with a 2.6.24.x kernel.

Anyway, after setting up an authentication source using a Windows 2003/2008 Active Directory domain controller and importing a batch of time based RSA key token, I set up the ASA to authenticate off the Radius server. Here's the necessary config on the ASA:

aaa-server rsaapp protocol sdi
aaa-server rsaapp (INSIDE) host 10.14.14.50 MY_PASSWORD_FOR_RADIUS_CLIENT

tunnel-group employees type remote-access
tunnel-group employees general-attributes
address-pool employees-pool
authentication-server-group rsaapp
default-group-policy operations
tunnel-group operations ipsec-attributes
pre-shared-key *

Here are several important things to do:

1. set up DNS entries for the RSA box and the ASA, both forward and reverse/PTR. The box seems to be looking for its FQDN. You can use the host file for setup.

2. make sure the ASA, RSA box, and domain controller all have accurate time (via NTP, etc.)

3. setup a radius client on the RSA box and use the same pass phrase you used in the ASA aaa-server config

4. assign token devices to users... start off with one user for testing.

5. Re-synchronize the token. I'm not 100% sure this is necessary, but I tried several tokens, and this seemed necessary.

6. Have the user log into the self-service console:

https://myrsaappliance.mydomain.local:7004/console-selfservice

He or she should log into the console with their active directory username and password. He or she should then set a PIN on the token.

7. Wait for a minute or a two, and then have the user log into the VPN appliance with the Cisco client. This seemed to be necessary, as the token didn't seem to work at first. After running through the configuration again, I tried waiting, and this worked.


Saturday, August 29, 2009

Entourage 2004 Crashes After Updates on OS X 10.5.8

I recently set up a new Mac Pro. I installed Office 2004 and copied the user's files over. Entourage started fine, and the user's Exchange mailbox seemed to open correctly.

I patched the installation of office, and Entourage started crashing shortly after launching it. I then removed Office 2004, and reinstalled it. This time, Entourage said that it could not open this version of the database. I patched 10.5.2 to 10.5.8, to no avail.

I tried various fixes other people suggested on the web. In the end, I patched 2004 with the latest patch, killed the Microsoft Database process. Since the user did not keep a PST, I simply moved the user's Entourage data in documents (In a Microsoft folder) to another location - and then reconfigured the entourage client for exchange.

Entourage opened with no issues.

Sunday, August 9, 2009

Exchange 2003 Not Starting - EventID 5197

We recently had a problem with an Exchange server running Windows 2003 server standard and enterprise exchange. We recabled the entire network, but did not perform any address changes. However, the exchange server would not boot correctly after restart. The Windows Server would hang on "applying settings" - unless you unplugged the NIC. If you unplugged the NIC, the box would use your cached local account and allow you to log in.

At any rate, I checked the two domain controllers for signs of problems - but could not find any. The error in the event log on the exchange server was event 9157. There was an MS article vaguely relating to it (http://support.microsoft.com/kb/297295) - but the exchange server's account was definitely present in AD users and computers. In spite of that, I did use ADSI Edit to make the suggested changes in that article, but it did not help.

As it turned out, someone had remove the Exchange security groups out of the default users OU a month before this happened. It just so happened that the exchange server had not been rebooted since then. I'm guessing that one of the group policies didn't apply - as it was probably hardcoded to an entry in ad users and computers

I moved both of those groups back to the users OU, and restarted the exchange server; it came back up after reboot. What I guess happened was that

Monday, July 6, 2009

1-Wire Temperature Sensors...

I recently bought a 1-Wire serial interface (Link45) and two T-sensors from iButtonlink as well as a power injector and power adapter. The power adapter was back-ordered, but arrived today. Using a USB serial adapter and Digitemp, I get results like:

user@testmachine$ sudo digitemp_DS9097U -s /dev/ttyUSB0 -a
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Jul 06 22:26:20 Sensor 0 C: 22.81 F: 73.06
Jul 06 22:26:21 Sensor 1 C: 22.56 F: 72.61

One of the nice things is that you can add more sensors and also things like humidity sensors.

It's pretty useful. I discovered that someone had written a little plugin/wrapper for Nagios here.