April 2007 Archives

New Router

Filed under: Tech

| No TrackBacks

I've been documenting my efforts at getting my new router up and running over at WRTSL54GS Adventures, basically just a place for me to make notes to myself. ;) My Linksys WRTSL54GS is now up and running, and so the Firewall script that I had just put into production here is now a thing of the past, now that I can handle the tasks I need at the router level.

This is a fantastic router, and running OpenWRT on it instead of the default Linksys firmware opens up a lot of possibilities by being able to run Linux on the router, and add whatever functionality you might happen to need.

One thing that's very important when setting up a new StartupItem like I did with my Firewall script is to make sure that the privledges are set correctly so that it actually runs at startup... The acticle I referenced didn't include this, but the reader comments at the end did. Specifically, the folder and enclosed items should be owned by root with group wheel with privs 755.

I had one question regarding the script and how I references the set of rules I wrote, the original article had these saved in /etc, which to me seemed a bit silly, having them in the same folder as the Startup script seemed much more logical. Here is my working script for this:


#!/bin/sh

##
# Firewall
##

. /etc/rc.common

StartService ()
{
if [ "${FIREWALL:=-NO-}" = "-YES-" ]
then
ConsoleMessage "Starting Firewall"
sh /Library/StartupItems/Firewall/fw.rules > /dev/null
fi
}

StopService ()
{
ConsoleMessage "Stopping Firewall"
/sbin/ipfw -f -q flush
}

RestartService ()
{
StopService
StartService
}

RunService "$1"

November 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

About this Archive

This page is an archive of entries from April 2007 listed from newest to oldest.

March 2007 is the previous archive.

May 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 5.031