Skip to content
IGD implementation in pure Python
Branch: master
Clone or download
Latest commit 6acf415 Jun 24, 2018



This is a small python based tool to interact with IGD capable devices. IGD is protocol, usually supported by routers, that allows you to:

  • Learn the public (external) IP address
  • Enumerate existing port mappings
  • Add and remove port mappings

This tool aims to be simple, clean, easy to install, hackable tool. Hence, CI is enabled, test coverage should be kept to the maximum, code is linted, types are checked, open source libraries are reused, etc.

Sorry, no Python 2 support.


$ pip3 install igd

or if you want to get latest development changes:

$ pip3 install git+



igd aims for ergonomic usage with convenient defaults but also tries to give full control over how ports are mapped, listed and removed.

For more detailed description just use the --help option for each command:

$igd --help
Usage: igd [OPTIONS] COMMAND [ARGS]...

  --help  Show this message and exit.

  add  Add new port mapping.
  ip   Get external IP from IGD.
  ls   Get all port mappings.
  rm   Remove port mapping.

Other projects

Other quite usable projects that I found to work:


You can’t perform that action at this time.