MacOS X provides host firewalling using ipfw. This is the way I do it.

The firewall I run on my iBook is moderately restrictive. It only accepts inbound connections on 22 and 80 but will allow all outbound and established. For UDP, it permits dns, dhcp, ntp, and traceroute. All icmp is permitted. All restrictions are interface-based, not IP based so there is no protection or limits against spoofed addresses and nasty things like that. However, since I have five different Locations, the greater priority is portability not ultimate security.

/Library/StartupItems/Firewall/Firewall
/Library/StartupItems/Firewall/StartupParameters.plist

How do I install this?

sudo mkdir /Library/StartupItems/Firewall
sudo curl -o /Library/StartupItems/Firewall/Firewall \ http://www.ptudor.net/~ptudor/osxipfw/Firewall
sudo curl -o /Library/StartupItems/Firewall/StartupParameters.plist \ http://www.ptudor.net/~ptudor/osxipfw/StartupParameters.plist
sudo sh /Library/StartupItems/Firewall/Firewall

Did that break everything? Run this and then figure out why.

/sbin/ipfw -f flush

Did it break NetInfo at boot? I haven't spent any time looking at that one yet.


(c)2001-2002 ptudor@ptudor.net