vyos_add_source_nat_rule
Creates a VyOS source NAT (SNAT/masquerade) rule in one commit, with optional source/destination matches, protocol, translation address, and save persistence.
Instructions
Create a source NAT (SNAT/masquerade) rule in one commit.
Args: rule: Rule number. outbound_interface: Egress interface, e.g. "eth0". translation_address: "masquerade" (default) or a specific/pool address. source_address: Optional source match, e.g. "192.168.0.0/24". destination_address: Optional destination match. protocol: Optional protocol match, e.g. "tcp", "udp", "tcp_udp". extra_fields: Additional {space-separated path: value} settings. description: Optional description. save: Persist after commit (default False).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rule": "<rule>",
"outbound_interface": "<outbound_interface>"
},
"name": "vyos_add_source_nat_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | ||
| save | No | ||
| protocol | No | ||
| description | No | ||
| extra_fields | No | ||
| source_address | No | ||
| outbound_interface | Yes | ||
| destination_address | No | ||
| translation_address | No | masquerade |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |