Page MenuHomePhabricator

iptables "addrtype --dst-type LOCAL" is there any code that uses this module?
OpenPublic

Asked by elico on May 13 2018, 6:16 PM.

Details

I noticed that in many cases the internal or the external IP of VYOS is dynamic.
To set a DNAT rule not matter what is the ip address that is assigned the "addrtype --dst-type LOCAL" option can be used in the nat table.
I tried to look at the sources in github but couldn't find a definitive answer if it is being used currently.
One example can be:

iptables -t nat -A PREROUTING -i pppoe0 -m addrtype --dst-type LOCAL -p tcp --dport 80 -j DNAT --to-destination 192.168.0.9

If it's being used I would like to know what and where to look for it.
If not I think it's a good idea to add support for this function.(maybe I am missing some fundamentals to understand the answer in the code)