It seems edgegateway.go func AddNATMapping(nattype, externalIP, internalIP, port string) lack support for being able to specify separate OriginalPort and TranslatedPort. Currently "port" parameter is used for both:
//add rule
natRule := &types.NatRule{
RuleType: nattype,
IsEnabled: true,
GatewayNatRule: &types.GatewayNatRule{
Interface: &types.Reference{
HREF: uplink.HREF,
},
OriginalIP: externalIP,
OriginalPort: port,
TranslatedIP: internalIP,
TranslatedPort: port,
Protocol: "tcp",
},
}
It'd be great to be able to add more flexible DNAT port mappings.. thoughts?