IGD-mapper is a simple Python script used to setup IGD (Internet Gateway Device) NAT rules though UPnP. The script use a config file (/etc/igd-mapper.ini) that contains the rules for a given host.
IGD-mapper can be used in network "PostUP" script and crontab.
Several options are available:
python setup.py install (or develop)
Install directly from pipy (easier)
pip install igdmapper
Run in a pipenv
pipenv sync
pipenv run igd-mapper
igd-mapper
Options
usage: idg-mapper [-h] [-c CONFIG] [-l] [-f] [-d] [-q]
optional arguments:
-h, --help show this help message and exit
-c CONFIG config file
-l only list nat rules
-f only drop nat rules
-d enable debug
-q quiet, disable output
IGD-mapper use custom string to name rules (igd-mapper-hostname). This provides an easy way to find them, and clear old rules.