fd / go-nat

NAT port mapping library for Go
Apache License 2.0
43 stars 34 forks source link

Don't limit operation to RFC1918 ranges #2

Closed zorun closed 9 years ago

zorun commented 9 years ago

Currently, the code only runs NAT-PMP on local addresses in the ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

However, NAT-PMP/PCP can also be used for simple control of a stateful firewall, even when using public IPv4 or IPv6. See https://tools.ietf.org/html/rfc6887

Additionally, some people are beginning to use other ranges as "private" ranges: either unallocated network ranges (which is a very bad idea, but some people still do that), or the 100.64.0.0/10 range allocated to CG-NAT by https://tools.ietf.org/html/rfc6598