1 How to install secnet on a Fink-equipped OS X system:
4 - Download and install ADNS:
5 ./configure --disable-dynamic
12 - Install tuntap for OSX from http://tuntaposx.sourceforge.net/
13 - Create /etc/secnet/{key,secnet.conf,sites.conf} as usual
14 - If you don't want secnet 'always on', edit
15 uk.org.greenend.secnet.plist and remove *both* these two lines:
18 - Create the 'secnet' user and install the job configuration:
22 sudo launchctl start uk.org.greenend.secnet
25 sudo launchctl stop uk.org.greenend.secnet
28 sudo launchctl unload /Library/LaunchDaemons/uk.org.greenend.secnet.plist
29 sudo rm -f /Library/LaunchDaemons/uk.org.greenend.secnet.plist
31 If you need to enable IP forwarding:
32 sudo sysctl -w net.inet.ip.forwarding=1
34 (Note that on a Mac, you need to enable IP forwarding if you want to
35 route to addresses on one interface via another; i.e. if you expect to
36 be able to reach an address on en0 with a packet delivered through
37 tun0, IP forwarding must be turned on.)
39 How to import secnet into XCode 3.2:
41 - Set up build directories as follows:
42 $ mkdir build/Debug build/Release
44 $ ~/src/secnet/configure CFLAGS="-g -O0"
46 $ ~/src/secnet/configure
48 (Replace ~/src/secnet with the *absolute* path to your secnet tree -
49 XCode cannot map the relative paths in errors to the source files
52 - Menubar -> File -> New Project
53 - Choose the Mac OS X -> Other -> External Build System template
54 - Choose the *parent* of the secnet directory and call the project
56 - OK the overwrite (it won't overwrite anything that matters)
57 - This creates 'build' and 'secnet.xcodeproj' directories in your
59 - Right-click Groups & Files -> secnet -> Add -> Existing files and
60 select all the *.c, *.h, *.y and *.fl files.
61 - Omit the following files:
63 - *.tab.[ch] | generated during build
66 - snprintf.[ch] - unnecessary on OSX
67 - Sort by 'kind' may make this easier
68 - Leave 'Copy items...' unchecked
69 - Add To Targets should have 'secnet' checked
70 - For conffile.fl, right click Get Info -> General, and set File
71 Type to sourcecode.lex.
72 - Under Groups & Files -> secnet, select all source files and right
73 click Get Info -> General, and set:
76 - Check Editor uses tabs
77 - Double click click Groups & Files -> Targets secnet
78 - Add '-C $TARGET_BUILD_DIR' to the start of the arguments.
80 You should now be able to build both debug and release configurations
83 Richard Kettlewell 2011-07-23