NAT Forwarding Configuring NAT forwarding for HTTP to Ubuntu

I am trying to configure NAT forwarding for HTTP to an Ubuntu-CLI VM but when trying to commit I receive this error: “Destination NAT configuration error in rule 10: Cannot use ports with an IPv4net type translation address as it statically maps a whole network of addresses onto another network of addresses”

set nat destination rule 10 description ‘Port Forward: Public HTTP (8080) to Ubuntu-CLI-1 HTTP (80)’
set nat destination rule 10 destination port ‘8080’
set nat destination rule 10 inbound-interface ‘eth0’
set nat destination rule 10 protocol ‘tcp’
set nat destination rule 10 translation address 192.168.193.12
set nat destination rule 10 translation port 80

Here is my recipe, the IPv4 address I’m using is the Ubuntu’s IP that it received from dhcp.

What version did you use to get that error?

Here is an example from 1.5-rolling which commits without errors (also worked when removing destination address and just keep destination port):

set nat destination rule 10 destination address '192.168.1.100'
set nat destination rule 10 destination port '8080'
set nat destination rule 10 inbound-interface 'eth3'
set nat destination rule 10 protocol 'tcp'
set nat destination rule 10 translation address '192.168.3.222'
set nat destination rule 10 translation port '80'

That is a TCP-packet with dstip 192.168.1.100 and dstport 8080 arrives at eth3.

That will get get translated into dstip 192.168.3.222 and dstport 80.

So in your case the config would look something like:

set nat destination rule 10 destination port '8080'
set nat destination rule 10 inbound-interface 'eth0'
set nat destination rule 10 protocol 'tcp'
set nat destination rule 10 translation address '192.168.193.12'
set nat destination rule 10 translation port '80'

That is TCP-packet with dstport 8080 arrives at eth0.

That will get get translated into dstip 192.168.193.12 and dstport 80.