Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions docs/vpp/configuration/nat/nat44.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

NAT44 has two main use cases:

* **Source NAT (SNAT)**: Enabling Internet access for hosts in private networks using dynamic or static address translation

Check warning on line 13 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=123
* **Destination NAT (DNAT)**: Providing external access to internal services through static port forwarding rules

Check warning on line 14 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=113

VyOS supports both dynamic translation using address pools and static mappings for predictable address translation requirements.

Check warning on line 16 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=128

Configuration of NAT44 involves few steps:

Expand All @@ -23,35 +23,35 @@
Dynamic and Static Operations
=============================

NAT44 configuration can be done in one of two ways or in both ways simultaneously:

Check warning on line 26 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=82

1. Dynamically performing NAT using a pool of public IP addresses.
2. Statically mapping private IP addresses to public IP addresses.

To configure dynamic NAT, you need to define a pool of public IP addresses that will be used for translation. This offers an easy way to provide Internet access to internal users.

Check warning on line 31 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=179

Static rules are more suitable for scenarios where you need to provide consistent and predictable mappings between private and public IP addresses, also they are the only way to configure DNAT.

Check warning on line 33 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=193

Interfaces Configuration
========================

The first step in configuring NAT44 is defining which interfaces handle inside (private) and outside (public) traffic. VyOS uses these interface designations to determine the direction of translation.

Check warning on line 38 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=200

Inside Interfaces
-----------------

Inside interfaces connect to private networks where hosts need source NAT to access external networks.

Check warning on line 43 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=102

.. cfgcmd::

set vpp nat44 interface inside <inside-interface>

Traffic flowing **from** inside interfaces gets source NAT applied, translating private source addresses to public addresses from the translation pool.

Check warning on line 49 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=151

Outside Interfaces
------------------

Outside interfaces connect to public networks where external hosts may need to access internal services.

Check warning on line 54 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=104

.. cfgcmd::

Expand Down Expand Up @@ -554,23 +554,22 @@
# Increase session limit for high-capacity deployment
set vpp settings nat44 session-limit 100000

Forwarding Behavior
Processing Mode
-------------------

By default, VyOS NAT44 forwards packets that don't match any NAT rules according to the routing table. This behavior can be controlled:
NAT44 processing behavior can be controlled using the processing-mode option. Choose how NAT44 treats packets that do not match any NAT rule:

.. cfgcmd:: set vpp settings nat44 no-forwarding
.. cfgcmd:: set vpp settings nat44 processing-mode <mode>

Disable forwarding of packets that don't match existing NAT translations. When enabled, only packets that match static or dynamic NAT rules will be processed; all other traffic will be dropped.
The available processing modes are:

.. important::

This is a significant difference from traditional NAT solutions. By default, VyOS NAT44 allows non-NAT traffic to be forwarded normally. Using ``no-forwarding`` creates a pure NAT-only device that drops any traffic not covered by NAT rules.
- ``static-dynamic``: Process traffic by both static rules and dynamic NAT (default)
- ``static-bypass``: Process traffic by static NAT rules only, pass without NAT if not matched

**Use cases for no-forwarding:**
**Use cases:**

* **Pure NAT gateway**: When the router should only handle NAT traffic and drop everything else
* **Security isolation**: Preventing any non-NAT traffic from traversing the device
* **static-dynamic**: Use when you want dynamic translations created for unmatched inbound traffic so most flows get NATed
* **static-bypass**: Use when NAT should apply only to explicitly configured static mappings and all other traffic must continue to be routed normally

Worker Assignment
-----------------
Expand Down
Loading