home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Destination NAT (one-to-many)

Another application where DNAT might be used is a scenario in which there are multiple instances (each on a different port) of the server inside a private network. To configure NAT for this particular scenario, perform the following steps in configuration mode.

Table 1. Configuring destination NAT (one-to-many)

Step

Command

Create DNAT rule 10.

vyatta@vyatta# set service nat destination rule 10

Apply this rule to all incoming packets on the dp0p1p1 interface bound for the 12.34.56.78 address on a well know http port.

vyatta@vyatta# set service nat destination rule 10 inbound-interface dp0p1p1
vyatta@vyatta# set service nat destination rule 10 destination port http
vyatta@vyatta# set service nat destination rule 10 destination address 12.34.56.78
vyatta@vyatta# set service nat destination rule 10 protocol tcp

Forward traffic to internal host address 10.0.0.64 across ports 2000-2019 and across 20 instances in this case.

vyatta@vyatta# set service nat destination rule 10 translation address 10.0.0.64
vyatta@vyatta#  set service nat destination rule 10 translation port 2000-2019
vyatta@vyatta# set service nat destination rule 10 inbound-interface dp0p192p1

Commit the change.

vyatta@vyatta# commit

Show the configuration.

vyatta@vyatta# show nat destination rule 10
 destination {
     address 12.34.56.78
     port http
 }
 inbound-interface dp0p1p1
 protocol tcp
 translation {
     address 10.0.0.64
     port 2000-2019
 }