http://brainmurmurs.com/products/pulse/download.php
Pulsed's installer is hopelessly linux-centric, and makes icky (and mostly invalid) assumptions about the layout of the system. The sources do compile and run on FreeBSD 6.x, though. Just ignore all their 'convenience' scripts.
Prerequisites (all available through ports or packages)
- Bison
- GNU Make
- Python
- Fetch the sources and build them. The ./configure line is identical to that from linuxConfig.sh, except without the custom CFLAGS.
tar zxvf pulse-gateway-1.0-src.tgz cd pulse-gateway ./configure --disable-lzo --without-tun --disable-ssl --prefix=/usr gmake
- The most important files to worry about are:
pulse-gateway/resources/createPulseConf.py pulse-gateway/resources/pulse.header pulse-gateway/pulsed
- Install and configure packetfilter to NAT from 10.0.0.0/8 to your uplink.
- Enable gateway in rc.conf
- Install pulsed into /usr/sbin and secure to root:wheel (750) because it will not work under a mortal UID (no perms to modify routing table).
- Patch createPulseConf.py to fix a stale route issue:
--- /etc/pulsed/createPulseConf.py.orig Thu Feb 8 04:56:17 2007 +++ /etc/pulsed/createPulseConf.py Thu Feb 8 03:50:06 2007 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/local/bin/python # Copyright (C) 2006 by Brain Murmurs, Incorporated # This software is furnished under a license and may be used and copied only # in accordance with the terms of such license and with the inclusion of the @@ -61,6 +61,7 @@ print " };" print "" print " down {" + print " route \"delete -net 10.%s.%s.0 -netmask 255.255.255.0\";" % (bsubnet, addr) print " };" print "}" print ""
- Patch options.pulse to remove options FreeBSD pppd doesn't recognize:
--- /etc/ppp/options.pulse.orig Thu Feb 8 04:56:17 2007 +++ /etc/ppp/options.pulse Thu Feb 8 03:37:23 2007 @@ -1,5 +1,5 @@ debug -dump +#dump lock #vj-max-slots 16 ipparam 10.3.0.0 @@ -8,7 +8,7 @@ mtu 8192 mru 8192 #kdebug 7 -logfile /var/log/system.log +#logfile /var/log/system.log bsdcomp 15,15 idle 60 name boba
- Install patched createPulseConf.py into /etc/pulsed (700)
- Install pulse.header into /etc/pulsed (600)
- Install patched options.pulse into /etc/ppp (600)
- Create /etc/pulsed/pulse-users.csv (600) and populate with users, one per line:
user,pass
- cd /etc/pulsed && ./createPulseConf.py - This will rebuild /etc/pulsed/pulsed.conf and /etc/ppp/chap-secrets .. Do this every time you modify pulse.header or pulse-users.csv
- Create a simple startup script
--- /dev/null Thu Feb 8 05:00:00 2007 +++ /usr/local/etc/rc.d/pulsed Thu Feb 8 04:42:39 2007 @@ -0,0 +1,48 @@ +#!/bin/sh +# +# PROVIDE: pulsed +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable postfix: +# pulsed_enable (bool): Set it to "YES" to enable pulsed. +# Default is "NO". +# pulsed_pidfile (path): Set full path to pulsed.pid. +# Default is "/var/run/pulsed.pid". +# + +. /etc/rc.subr + +name="pulsed" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${pulsed_enable="NO"} +: ${pulsed_pidfile="/var/run/pulsed.pid"} + +start_cmd=${name}_start +stop_cmd=${name}_stop +reload_cmd=${name}_reload +extra_commands="reload" + +pidfile=${pulsed_pidfile} + +pulsed_start() { + /usr/sbin/pulsed -s -f /etc/pulsed/pulsed.conf +} + +pulsed_stop() { + killall -TERM pulsed +} + +pulsed_reload() { + killall -HUP pulsed +} + +run_rc_command "$1"
- Enable execution at startup by inserting 'pulsed_enable="YES"' into rc.conf.
I think that's everything...