Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

NAT rules

NAT is configured as a series of NAT“ rules”. Each rule instructs NAT to perform a network address translation that you require. NAT rules are numbered and are evaluated in numerical order. The NAT rule number can be changed by using the rename and copy commands.

Note: Changes to NAT rules affect only connections established after the changes are made. Those connections that are already established at the time a change is made are not affected.
Note: Leave a gap between NAT rule numbers.

It is advisable to create your NAT rules leaving “space” between the numbers. For example, you might initially create your set of NAT rules numbered 10, 20, 30, and 40. This way, if you need to insert a new rule later and you want it to run in a particular sequence, you can insert it between existing rules without having to change any other rules.

Creating a SNAT rule

The vRouter allows you to configure SNAT and DNAT rules. To implement bidirectional NAT, you define a NAT rule for SNAT and one for DNAT. The following example shows how to define a SNAT rule, rule 10.

vRouter set service nat source rule 10