1: MiniUPnP Daemon
2: (c) 2006 Thomas Bernard
3: This software is subject to the conditions detailed in
4: the LICENCE file provided within the distribution.
5:
6: How to build and run miniupnpd for your router running openwrt.
7: These instructions apply to the OpenWRT WHITE RUSSIAN (RC6) version.
8: My device is a Linksys WRT54G v1, used in pppoe mode.
9: More information about OpenWRT on http://openwrt.org/
10:
11: First make sure that openwrt white russian RC6 is up and running on your
12: router device.
13:
14: NOTES : Makefile.openwrt has been updated, following informations could
15: be inacurate.
16: The X-Wrt team made an ipk package out of miniupnpd,
17: check the webpage : http://www.x-wrt.org/
18:
19: * A. COMPILATION *
20:
21: To Build, use your PC. I have been using the SDK but you might need
22: to compile the cross compiler yourself.
23:
24: 1. Get the SDK from http://downloads.openwrt.org/whiterussian/rc6/
25: I used http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-ppc-1.tar.bz2
26: unpack somewhere and add the bin directory to your PATH environement :
27: > tar xvjf OpenWrt-SDK-Linux-i686-1.tar.bz2
28: > PATH=`pwd`/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin:$PATH
29: > mipsel-linux-gcc --version
30: mipsel-linux-gcc (GCC) 3.4.4 (OpenWrt-1.0)
31: [...]
32:
33: 2. Get iptables 1.3.3 sources from http://downloads.openwrt.org/sources/iptables-1.3.3.tar.bz2
34: unpack and compile libiptc.a
35: > tar xvjf iptables-1.3.3.tar.bz2
36: > cd iptables-1.3.3/libiptc/
37: > make CC=mipsel-linux-gcc
38:
39: 3. Go to miniupnpd directory and edit the Makefile.openwrt to make
40: IPTABLESINC and LIBS variables point to the correct directory.
41: > make -f Makefile.openwrt
42: > mipsel-linux-strip miniupnpd
43:
44: That's it !
45:
46:
47: * B. INSTALLATION - USAGE *
48:
49: 1. copy miniupnpd and scripts to the device :
50: > scp miniupnpd root@192.168.1.1:.
51: > cd linux
52: > scp iptables_init.sh iptables_flush.sh root@192.168.1.1:.
53: > scp iptables_display.sh iptables_removall.sh root@192.168.1.1:.
54:
55: 2. log onto your router and edit the scripts in order to adapt to your
56: configuration : EXTIF variable shoud be set to your external network
57: interface. In my case it is ppp0
58:
59: 3. init tables :
60: > ./iptables_init.sh
61:
62: 4. run the daemon :
63: ./miniupnpd -i ppp0 -a 192.168.1.1 -p 5000 -U -d
64: -d option is a debug option to prevent the program from going to
65: background. It is usefull to see the debug messages and check if everything
66: is ok.
67:
68: 5. Once you checked that everything is ok,
69: you can set up a script in /etc/init.d etc...
70:
71: If you can build an ipkg package for miniupnpd, I'll be glad !
72:
73: Thomas
74: contact me by email : miniupnp@free.fr
75:
76:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>