diff options
author | Renato Botelho <garga@pfSense.org> | 2013-08-26 04:31:59 -0700 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2013-08-26 04:31:59 -0700 |
commit | 9394479429196edb2e4c25fba4affc38934cc3f7 (patch) | |
tree | 4667b6725d7924dfb09a96c7c161dfefd94fdf4a | |
parent | 3373c67f384c637b0bd39bf1a0eaa32df86bd490 (diff) | |
parent | 422243858bab08d21faf97b7d0f5badbc76f8612 (diff) | |
download | pfsense-packages-9394479429196edb2e4c25fba4affc38934cc3f7.tar.gz pfsense-packages-9394479429196edb2e4c25fba4affc38934cc3f7.tar.bz2 pfsense-packages-9394479429196edb2e4c25fba4affc38934cc3f7.zip |
Merge pull request #479 from phil-davis/master
Use OpenVPN Manager client management port if specified for the server concerned
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index ac006d20..1d1609ed 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -156,7 +156,7 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid) { } elseif (($settings['mode'] == "server_tls") || (($settings['mode'] == "server_tls_user") && ($settings['authmode'] != "Local Database"))) { $cert = $config['cert'][$crtid]; if (!$cert) - $input_errors[] = "Could not find client certifficate."; + $input_errors[] = "Could not find client certificate."; } else $nokeys = true; @@ -316,11 +316,16 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese if ($openvpnmanager) { + if (!empty($settings['client_mgmt_port'])) { + $client_mgmt_port = $settings['client_mgmt_port']; + } else { + $client_mgmt_port = 166; + } $conf .= $nl; $conf .= "# dont terminate service process on wrong password, ask again{$nl}"; $conf .= "auth-retry interact{$nl}"; $conf .= "# open management channel{$nl}"; - $conf .= "management 127.0.0.1 166{$nl}"; + $conf .= "management 127.0.0.1 {$client_mgmt_port}{$nl}"; $conf .= "# wait for management to explicitly start connection{$nl}"; $conf .= "management-hold{$nl}"; $conf .= "# query management channel for user/pass{$nl}"; |