Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save killbus/c45cbda3c61295ad057e72147fa6ec20 to your computer and use it in GitHub Desktop.
Save killbus/c45cbda3c61295ad057e72147fa6ec20 to your computer and use it in GitHub Desktop.

rule for host

iptables -t nat -A DOCKER ! -i <container-bridge> -p udp --match multiport --dports 1024:65535 -j DNAT --to-destination <container-internal-ip>

Some Sources

https://github.com/team-brh/game-servers
https://blog.chionlab.moe/2018/02/09/full-cone-nat-with-linux/
https://blog.csdn.net/jk110333/article/details/8229828

Tester

https://github.com/automation-stack/nat-discovery
https://pypi.org/project/pystun/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment