Monthly Archives: January 2011

Small routing script

In recent days I was confronted with a problem regarding the routing under Linux.

The request was to add a route on a Proxy ARP server.

The Linux OS does give you the possibility to do add a route, in an “automatic mode”, in ways like:

  • add a route on the interface configuration (it will be applied only when the interface will go on-line) – for example Ubuntu and SUSE Linux
  • add a route on the network start script
  • add a route in the static-routes file
  • add a route with a script on the ifup folder on the “/sbin/ifup” (here more details:

But because this was a complicated setup I was forced to use a bash script under the “/sbin/ifup”.

The script looked like this:

DMZ_INTERFACE=”eth0″               #we should have an IP address on this network –
LAN_INTERFACE_1=”eth1″          #we should have an IP address on this network –
EXTIPADDR=”″     #an dmz gateway
INTIPADDR=”″           #all the internal traffic

exit 0

I hope that this is going to help you,

Mihai out!

Monitoring Keepalived with Nagios

This is one of the cases where the passive check of the Nagios monitoring system comes in handy as we need to be informed immediately when the Keepalived changes state. So you will need an NSCA system implemented with your Nagios configuration.

Studying the Keepalived configuration we found that the authors have implemented the option to run a script that when the state of the VRRP changes. The script I’m referring to is run under the “notify” option.

Continue reading