In IPSec VPN data path:
VMware NSX 3.2.3 and older
For VPN:
Workaround (Not persistent through edge VM reboots):
nsx-edge> set firewall <Uplink-UUID> param one_state_opt value 0
Resolution 1 (Persistent through edge reboots - creating new profile):
// Before running APInsx-edge> get firewall <UUID> param one_state_optone_state_opt : 1
// After running APInsx-edge> get firewall <UUID> param one_state_optone_state_opt : 0
Following are the details:
----------------------------
1. Configure GeneralSecuritySettingsProfile
1.1 Create profile.json that looks like:
{ "enable_double_flow" : true, "resource_type" : "GeneralSecuritySettingsProfile", "display_name" : "nat-security-profile"}
1.2 Run following API to create the profile object:
curl -k -H 'Content-Type:application/json' -u 'admin' -X POST https://<nsx-mgr-IP>/api/v1/firewall/profiles -d "`cat profile.json`"
To view:curl -k -H 'Content-Type:application/json' -u 'admin' https://<nsx-mgr-IP>/api/v1/firewall/profiles?resource_type=GeneralSecuritySettingsProfile
2. Configure ServiceConfig:
2.1 Create service_config_highline.json that looks like:
Note: The profile target_id can be found by running the view command in Step 1.2. The Logical Router target_id should be the LR (Logical Router) UUID of the logical router of the UPLINK port where you want to run the firewall param NSX CLI. 2 logical routers are being set here but it can be set with one or more.
{ "display_name": "testServiceConfig", "profiles": [ { "profile_type":"GeneralSecuritySettingsProfile", "target_id":"########-####-####-####-############" } ], "precedence": 10, "applied_to": [ { "target_type": "LogicalRouter", "target_id": "########-####-####-####-############" }, { "target_type": "LogicalRouter", "target_id": "########-####-####-####-############" } ]}
2.2 Configure service-config's object:
curl -k -H 'Content-Type:application/json' -u 'admin' -X POST https://<nsx-mgr-IP>/api/v1/service-configs -d "`cat service_config_highline.json`"
To review:curl -k -H 'Content-Type:application/json' -u 'admin' https://<nsx-mgr-IP>/api/v1/service-configs
Resolution 2 (Persistent through edge reboots - updating existing profile to add additional logical routers):
1. Pull existing service-config:
curl -k -H 'Content-Type:application/json' -u 'admin' https://<nsx-mgr-IP>/api/v1/service-configs
2. Create JSON file with output of existing service-config:
curl -k -H 'Content-Type:application/json' -u 'admin' "https://<nsx-mgr-IP>/api/v1/service-configs/<UUID-of-existing-service-config>" > existing_service_config.json
3. Edit 'existing_service_config.json' file with the file editor of your choosing (vi, vim, nano, etc.) to update the request body with the additional logical routers and then save the change (only added section highlighted in GREEN):
{ "profiles" : [ { "profile_type" : "GeneralSecuritySettingsProfile", "target_id" : "########<UUID-of-GeneralSecuritySettingsProfile>############", "target_display_name" : "nat-security-profile", "target_type" : "UpmProfile", "is_valid" : true } ], "precedence" : 10, "applied_to" : [ { "target_id" : "########<UUID-of-existing-LR>############", "target_display_name" : "Tier0-existing", "target_type" : "LogicalRouter", "is_valid" : true }, { "target_id" : "########<UUID-of-new-LR>############", "target_type" : "LogicalRouter" } ], "resource_type" : "ServiceConfig", "id" : "########<UUID-of-existing-service-config>############", "display_name" : "testServiceConfig", "_system_owned" : false, "_protection" : "NOT_PROTECTED", "_create_time" : 1749165765861, "_create_user" : "admin", "_last_modified_time" : 1749166132018, "_last_modified_user" : "admin", "_revision" : 2}
4. Update existing service-config with the updated JSON file (existing_service_config.json):
curl -k -H 'Content-Type:application/json' -u 'admin' -X PUT https://<nsx-mgr-IP>/api/v1/service-configs/########<UUID-of-existing-service-config>############ -d "`cat existing_service_config.json`"
5. Verify service-config was updated properly:
curl -k -H 'Content-Type:application/json' -u 'admin' "https://<nsx-mgr-IP>/api/v1/service-configs/<UUID-of-existing-service-config>"
// Before running APInsx-edge> get firewall <UUID> param one_state_optone_state_opt : 1
// After running APInsx-edge> get firewall <UUID> param one_state_optone_state_opt : 0
The issue is fixed in the following NSX releases: