diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vpn-config.pl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index b693b92..c6ab840 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -893,10 +893,17 @@ if ( $vcVPN->exists('ipsec') ) { } # when local-ip is dynamic then only the following generic form works $genout_secrets .= ": PSK \"$psk\"\n"; - } else { - $genout_secrets .= "$index1 $index2 : PSK \"$psk\"\n"; - } - $genout .= "\tauthby=secret\n"; + } else { + $genout_secrets .= "$lip $right "; + if ( defined ($authid) ){ + $genout_secrets .= "$authid "; + } + if ( defined ($authremoteid) ) { + $genout_secrets .= "$authremoteid "; + } + $genout_secrets .= ": PSK \"$psk\"\n"; + } + $genout .= "\tauthby=secret\n"; } elsif ( defined($auth_mode) && $auth_mode eq 'rsa' ) { unless ( -r $local_key_file ) { |