version 1.1, 2012/02/21 23:16:02
|
version 1.1.1.3, 2013/07/22 00:32:35
|
Line 1
|
Line 1
|
MiniUPnP project. |
MiniUPnP project. |
(c) 2006-2009 Thomas Bernard | (c) 2006-2012 Thomas Bernard |
Homepage : http://miniupnp.free.fr/ |
Homepage : http://miniupnp.free.fr/ |
Mirror: http://miniupnp.tuxfamily.org/ |
Mirror: http://miniupnp.tuxfamily.org/ |
|
github: https://github.com/miniupnp/miniupnp |
|
|
miniupnpd is still under active developpement. This documentation is |
miniupnpd is still under active developpement. This documentation is |
likely to be a little outdated when you read it. So please go on the |
likely to be a little outdated when you read it. So please go on the |
Line 13 To Build and Install :
|
Line 14 To Build and Install :
|
- use BSD make to compile. |
- use BSD make to compile. |
- you can first 'make config.h' then edit config.h to your preferences and |
- you can first 'make config.h' then edit config.h to your preferences and |
finally 'make' |
finally 'make' |
|
Alternatively to editing config.h, options can be passed to genconfig.sh |
|
For more details : |
|
> ./genconfig.sh -h |
- add "rdr-anchor miniupnpd" and "anchor miniupnpd" lines to /etc/pf.conf |
- add "rdr-anchor miniupnpd" and "anchor miniupnpd" lines to /etc/pf.conf |
- some FreeBSD users reported that it is also necessary for them |
- some FreeBSD users reported that it is also necessary for them |
to explicitly allow udp traffic on 239.0.0.0/8 by adding the two following |
to explicitly allow udp traffic on 239.0.0.0/8 by adding the two following |
Line 25 To Build and Install :
|
Line 29 To Build and Install :
|
and "anchor miniupnpd" lines. |
and "anchor miniupnpd" lines. |
- install as root using : |
- install as root using : |
# make install |
# make install |
or | or |
# PREFIX=/usr/local make install |
# PREFIX=/usr/local make install |
- run as root : The daemon needs rights to modify pf rules. |
- run as root : The daemon needs rights to modify pf rules. |
|
|
edit the /etc/miniupnpd.conf file to set options. All options are also | edit the /etc/miniupnpd.conf file to set options. Almost all options are also |
available through command line switches. |
available through command line switches. |
To stop the daemon use : |
To stop the daemon use : |
> kill `cat /var/run/miniupnpd.pid` |
> kill `cat /var/run/miniupnpd.pid` |
Line 44 Installation steps are allmost the same as with pf.
|
Line 48 Installation steps are allmost the same as with pf.
|
*Solaris users would be interested in reading informations from : |
*Solaris users would be interested in reading informations from : |
http://blogs.sun.com/avalon/category/IPFilter |
http://blogs.sun.com/avalon/category/IPFilter |
|
|
|
============================= Mac OS X/ipfw =============================== |
|
|
|
- To enable non standard compilation options, |
|
> ./genconfig.sh -h |
|
Or edit config.h after it has been generated by genconfig.sh |
|
- use 'bsdmake' or 'make -f Makefile.macosx' to build |
|
|
============================ Linux/netfilter ============================== |
============================ Linux/netfilter ============================== |
To Build and install : |
To Build and install : |
|
|
- make sure you have libiptc available on your system : |
- make sure you have libiptc available on your system : |
if you are using debian, "apt-get install iptables-dev" |
if you are using debian, "apt-get install iptables-dev" |
|
Some versions of the iptables-dev package don't include the |
|
necessary files : read "how to get libiptc with its headers on debian" below. |
In anycase, libiptc is available in iptables sources packages |
In anycase, libiptc is available in iptables sources packages |
from http://netfilter.org |
from http://netfilter.org |
- edit and run netfilter/iptables_init.sh shell script. |
- edit and run netfilter/iptables_init.sh shell script. |
Line 59 To Build and install :
|
Line 72 To Build and install :
|
> vi config.h |
> vi config.h |
- Build the daemon |
- Build the daemon |
> make -f Makefile.linux |
> make -f Makefile.linux |
If not using iptables from your system, | If not using iptables from your system, |
> IPTABLESPATH=/path/to/iptables-1.4.1 make -f Makefile.linux |
> IPTABLESPATH=/path/to/iptables-1.4.1 make -f Makefile.linux |
note : make sure you have iptables with static libraries compiled. |
note : make sure you have iptables with static libraries compiled. |
use "./configure --enable-static" before compiling iptables |
use "./configure --enable-static" before compiling iptables |
Line 77 NOTE: a /etc/init.d/miniupnpd script will be installed
|
Line 90 NOTE: a /etc/init.d/miniupnpd script will be installed
|
If it suits you, you can use is with start, stop or restart argument. |
If it suits you, you can use is with start, stop or restart argument. |
# /etc/init.d/miniupnpd restart |
# /etc/init.d/miniupnpd restart |
|
|
|
|
|
How to get libiptc with its headers on debian : |
|
(Note: that should be useless now that netfilter/tiny_nf_nat.h is included) |
|
- Use apt-get to get sources : |
|
> apt-get source iptables |
|
you should then have an iptables-x.x.x/ directory. |
|
- configure and compile : |
|
> cd iptables-x.x.x/ |
|
> ./configure --enable-static |
|
> make |
|
- it is now possible to compile miniupnpd using the following command : |
|
> IPTABLESPATH=§path/to/iptables-x.x.x make -f Makefile.linux |
|
|
=========================== Configuration ============================= |
=========================== Configuration ============================= |
Edit the /etc/miniupnpd.conf file to set options. All options are also | Edit the /etc/miniupnpd.conf file to set options. Almost all options are |
available through command line switches. | also available through command line switches. |
|
|
Miniupnpd supports some kind of security check for allowing or disallowing |
Miniupnpd supports some kind of security check for allowing or disallowing |
redirection to be made. The UPnP permission rules are read from the |
redirection to be made. The UPnP permission rules are read from the |
Line 109 http://kruithof.xs4all.nl/uuid/uuidgen
|
Line 135 http://kruithof.xs4all.nl/uuid/uuidgen
|
On linux systems, one could also use the command |
On linux systems, one could also use the command |
'cat /proc/sys/kernel/random/uuid' to generate an uuid. |
'cat /proc/sys/kernel/random/uuid' to generate an uuid. |
|
|
|
More simple, use the genuuid makefile target : |
|
> make genuuid |
|
or |
|
> make -f Makefile.linux genuuid |
|
This target is needed by the "install" target, so it should be done |
|
automatically. |
|
|
To stop the daemon use : |
To stop the daemon use : |
# kill `cat /var/run/miniupnpd.pid` |
# kill `cat /var/run/miniupnpd.pid` |
or if your linux system use /etc/init.d/ | or if your linux system use /etc/init.d/ |
# /etc/init.d/miniupnpd stop |
# /etc/init.d/miniupnpd stop |
|
|
|
|