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
Created new endpoint to create, read, update and delete 1:1 NAT mappings, created unit test for 1:1 NAT endpoint, updated documentation, fixed bug that prevent interface from being located when using default description
| 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). Floating rules are not supported. |
1056
+
| src | string | Set the source address of the mapping. This may be a single IP, network CIDR, alias name, or interface. When specifying an interface, you may use the physical interface ID, the descriptive interfance name, or the pfSense ID. To use only interface address, add `ip` to the end of the interface name otherwise the entire interface's subnet is implied. To negate the context of the source address, you may prepend the address with `!`|
1057
+
| dst | string | Set the destination address of the mapping. This may be a single IP, network CIDR, alias name, or interface. When specifying an interface, you may use the physical interface ID, the descriptive interface name, or the pfSense ID. To only use interface address, add `ip` to the end of the interface name otherwise the entire interface's subnet is implied. To negate the context of the source address, you may prepend the address with `!`|
1058
+
| external | string | Specify IPv4 or IPv6 external address to map Inside traffic to. This Is typically an address on an uplink Interface. |
1059
+
| natreflection | string | Set the NAT reflection mode explicitly. Options are `enable` or `disable`. (optional) |
1060
+
| descr | string | Set a description for the mapping (optional) |
1061
+
| disabled | boolean | Disable the mapping upon creation (optional) |
1062
+
| nobinat | boolean | Disable binat. This excludes the address from a later, more general, rule. (optional) |
1063
+
| top | boolean | Add this mapping to top of access control list (optional) |
1064
+
| apply | boolean | Immediately apply this mapping after creation (optional) |
1065
+
1066
+
1067
+
1068
+
***Body:***
1069
+
1070
+
```js
1071
+
{
1072
+
"interface":"WAN",
1073
+
"src":"any",
1074
+
"dst":"em0ip",
1075
+
"external":"1.2.3.4",
1076
+
"natreflection":"enable",
1077
+
"descr":"Test 1:1 NAT entry",
1078
+
"nobinat":true,
1079
+
"top":false,
1080
+
"apply":true
1081
+
}
1082
+
```
1083
+
1084
+
1085
+
1086
+
### 2. Delete NAT 1:1 Mappings
1087
+
1088
+
1089
+
Delete an existing NAT 1:1 mapping by ID.<br>
1090
+
1091
+
_Requires at least one of the following privileges:_[`page-all`, `page-firewall-nat-1-1-edit`]
| id | integer | Specify the ID of the 1:1 mapping to update. |
1175
+
| interface | string | Update 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). (optional) |
1176
+
| src | string | Update the source address of the mapping. This may be a single IP, network CIDR, alias name, or interface. When specifying an interface, you may use the physical interface ID, the descriptive interfance name, or the pfSense ID. To use only interface address, add `ip` to the end of the interface name otherwise the entire interface's subnet is implied. To negate the context of the source address, you may prepend the address with `!`|
1177
+
| dst | string | Update the destination address of the mapping. This may be a single IP, network CIDR, alias name, or interface. When specifying an interface, you may use the physical interface ID, the descriptive interface name, or the pfSense ID. To only use interface address, add `ip` to the end of the interface name otherwise the entire interface's subnet is implied. To negate the context of the source address, you may prepend the address with `!` (optional) |
1178
+
| external | string | Update the IPv4 or IPv6 external address to map Inside traffic to. This Is typically an address on an uplink Interface. (optional) |
1179
+
| natreflection | string | Update the NAT reflection mode explicitly. Options are `enable` or `disable`. (optional) |
1180
+
| descr | string | Update the description for the mapping (optional) |
1181
+
| disabled | boolean | Enable or disable the mapping upon update. True to disable, false to enable. (optional) |
1182
+
| nobinat | boolean | Enable or disable binat. This excludes the address from a later, more general, rule. True to disable binat, false to enable binat. (optional) |
1183
+
| top | boolean | Move this mapping to top of access control list upon update (optional) |
1184
+
| apply | boolean | Immediately apply this mapping after update (optional) |
0 commit comments