Vyatta has this option where you can reference for example ADDRv4_eth2 to get current eth2 IP address anywhere in NAT rule and it is replaced and maintained transparently for the user.
I am aware this can be emulated with scripting and global variables, maybe even address lists, but still it would be more convenient and user friendly and greatly simplify port forwarding.
The reason why most people keep asking the same question over and over again ("how do I port forward / hairpin NAT with dynamic IP") in this forum is that they don't seem to understand that they need dst-address in dstnat and to-address in srcnat rules to be their public IP for this to work, nor they have any clue how to get the value there automatically.
If I am not mistaken, if you just want simple dstnat without hairpin / loopback then you can just specify in-interface and omit dst-address. But in order for hairpin / loopback to work you need to have dstnat on both LAN and WAN side which means you must leave out in-interface and specify the dst-address instead. Of course you also need the srcnat rule which also needs to-addresses so it makes sense to have variables that resolve to various interfaces IP addresses.
I propose adding something like this:
Code: Select all
ether1_ipv4
ether2_ipv4
ether3_ipv4
...
ether7_ipv4
combo1_ipv4