You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| interface | string | Set which interface the mapping will apply to. You may specify either the interface's descriptive name, the pfSense ID (wan, lan, optx), or the physical interface id (e.g. igb0). |
1314
+
| protocol | string | Set which transfer protocol the mapping will apply to. |
1315
+
| src | string | Set the source address of the firewall rule. This must be an IP, CIDR, alias or any. |
1316
+
| dst | string | Set the destination address of the firewall rule. This may be a single IP, network CIDR, or alias name. To negate the context of the address, you may prepend the address with `!`|
1317
+
| srcport | string or integer | Set the TCP and/or UDP source port of the firewall rule. This is only necessary if you have specified the `protocol` to `tcp`, `udp`, `tcp/udp`|
1318
+
| dstport | string or integer | Set the TCP and/or UDP destination port of the firewall rule. This is only necessary if you have specified the `protocol` to `tcp`, `udp`, `tcp/udp`|
1319
+
| target | string | Specify the external IP to map this traffic to. This may be an IP address, IP subnet, alias, or empty string to use the Interface address. |
1320
+
| natport | string | Set the TCP and/or UDP port or port range to utilize when NATing (optional) |
1321
+
| staticnatport | boolean | Enable or disable static NAT ports. When enabling this field, any existing `natport` value will be lost. Defaults to false. (optional) |
1322
+
| descr | string | Set a description for the rule (optional) |
1323
+
| poolopts | string | Set the outbound NAT pool option for load balancing. Options are `round-robin`, `round-robin sticky-address`, `random`, `random sticky-address`, `source-hash`, `bitmask` or empty string for default. (optional) |
1324
+
| source_hash_key | string | Set a custom key hash to use when utilizing the `source-hash` NAT pool option. Value must start with `0x` following a 32 digit hex value. If this field is not specified, a random key hash will be generated. This field Is only available when `poolopts` Is set to `source-hash`. (optional) |
1325
+
| disabled | boolean | Disable the rule upon creation. Defaults to false. (optional) |
1326
+
| nonat | boolean | Enable or disable NAT for traffic that matches this rule. True for no NAT, false to enable NAT. Defaults to false. (optional) |
1327
+
| top | boolean | Add this mapping to top of access control list. Defaults to false. (optional) |
1328
+
| apply | boolean | Immediately apply this mapping after creation. Defaults to false. (optional) |
1329
+
1330
+
1331
+
1332
+
***Body:***
1333
+
1334
+
```js
1335
+
{
1336
+
"interface":"WAN",
1337
+
"protocol":"tcp",
1338
+
"src":"any",
1339
+
"srcport":"433",
1340
+
"dst":"em0ip",
1341
+
"dstport":"443",
1342
+
"target":"192.168.1.123",
1343
+
"local-port":"443",
1344
+
"natreflection":"purenat",
1345
+
"descr":"Forward pb to lc",
1346
+
"nosync":true,
1347
+
"top":false
1348
+
}
1349
+
```
1350
+
1351
+
1352
+
1353
+
### 2. Delete Outbound NAT Mappings
1354
+
1355
+
1356
+
Update existing outbound NAT mappings.<br><br>
1357
+
1358
+
_Requires at least one of the following privileges:_[`page-all`, `page-firewall-nat-outbound-edit`]
| id | integer | Specify the ID of the outbound NAT mapping to update |
1452
+
| interface | string | Update the interface the mapping will apply to. You may specify either the interface's descriptive name, the pfSense ID (wan, lan, optx), or the physical interface id (e.g. igb0). (optional) |
1453
+
| protocol | string | Update the transfer protocol the mapping will apply to. (optional) |
1454
+
| src | string | Update the source address of the firewall rule. This must be an IP, CIDR, alias or any. (optional) |
1455
+
| dst | string | Update the destination address of the firewall rule. This may be a single IP, network CIDR, or alias name. To negate the context of the address, you may prepend the address with `!` (optional) |
1456
+
| srcport | string or integer | Update the TCP and/or UDP source port of the firewall rule. This is only necessary if you have specified the `protocol` to `tcp`, `udp`, `tcp/udp` (optional) |
1457
+
| dstport | string or integer | Update the TCP and/or UDP destination port of the firewall rule. This is only necessary if you have specified the `protocol` to `tcp`, `udp`, `tcp/udp` (optional) |
1458
+
| target | string | Update the external IP to map this traffic to. This may be an IP address, IP subnet, alias, or empty string to use the Interface address. (optional) |
1459
+
| natport | string | Update the TCP and/or UDP port or port range to utilize when NATing (optional) |
1460
+
| staticnatport | boolean | Enable or disable static NAT ports. When enabling this field, any existing `natport` value will be lost. Defaults to false. (optional) |
1461
+
| descr | string | Update the description for the rule (optional) |
1462
+
| poolopts | string | Update the outbound NAT pool option for load balancing. Options are `round-robin`, `round-robin sticky-address`, `random`, `random sticky-address`, `source-hash`, `bitmask` or empty string for default. (optional) |
1463
+
| source_hash_key | string | Update the hash to a custom key hash to use when utilizing the `source-hash` NAT pool option. Value must start with `0x` following a 32 digit hex value. If this field is not specified, a random key hash will be generated. This field Is only available when `poolopts` Is set to `source-hash`. (optional) |
1464
+
| disabled | boolean | Disable the rule upon creation. Defaults to false. (optional) |
1465
+
| nonat | boolean | Enable or disable NAT for traffic that matches this rule. True for no NAT, false to enable NAT. Defaults to false. (optional) |
1466
+
| top | boolean | Move this mapping to top of access control list. Defaults to false. (optional) |
1467
+
| apply | boolean | Immediately apply this mapping after update. Defaults to false. (optional) |
0 commit comments