Juniper Secure Connect fails to establish a connection without a clear error.
We found this user was using an old VPN configuration in the past that was never deleted or deactivated after migrating to the new VPN configuration.
Old config:
gateway remote-vpn-scott {
ike-policy DYN-POLICY3;
dynamic {
user-at-hostname "[email protected]";
connections-limit 2;
ike-user-type shared-ike-id;
}
external-interface ge-0/0/7.0;
aaa {
access-profile scott.smith;
version v1-only;
vpn remote-vpn3 {
bind-interface st0.7;
ike {
gateway remote-vpn-scott;
ipsec-policy DYN-POLICY;
traffic-selector TS1 {
local-ip 192.168.171.64/26;
remote-ip 0.0.0.0/0;
traffic-selector TS2 {
local-ip 10.172.172.0/25;
New config:
gateway remote-vpn-scott-new {
ike-policy DYN-POLICY3-NEW;
dead-peer-detection {
optimized;
interval 10;
threshold 5;
external-interface ge-0/0/7;
local-address 85.230.120.10;
tcp-encap-profile SSL-VPN;
vpn remote-vpn3-NEW {
bind-interface st0.3;
df-bit clear;
copy-outer-dscp;
gateway no;
ipsec-policy no;
traffic-selector ts-1 {
local-ip 10.172.172.0/26;
traffic-selector ts-2 {
local-ip 10.172.172.64/26;
traffic-selector ts-3 {
local-ip 192.168.171.0/26;
traffic-selector ts-4 {
local-ip 10.172.172.192/26;
traffic-selector ts-5 {
profile no {
description "Scott Smith";
ipsec-vpn no;
client-config no;
It seems like Junos was linking the connection attempt to the old config and sometimes the new config (and that's why the logs show successes and failures for the same user).
I believe this is caused by the IKE-ID, which is the same in both VPN configurations. I saw a similar scenario a few months back with a site-to-site IPSec VPN, and the conflict was caused by the IKE-ID being the same in two different VPNs.
Therefore, in these types of scenarios, when we are sure the configuration is correct and the logs don't show us any clear error, it is best to check the config because there might be a config conflict causing confusion for Junos.
If you encounter a similar scenario, it is best to deactivate the old piece of configuration to avoid confusion or deactivate it right after creating the new piece of configuration.