From 46bc6e545a17e77202aaf01ec0cd8d5a46567525 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 25 Aug 2015 08:08:24 -0300 Subject: Move main pfSense content to src/ --- usr/local/www/vpn_ipsec_mobile.php | 740 ------------------------------------- 1 file changed, 740 deletions(-) delete mode 100644 usr/local/www/vpn_ipsec_mobile.php (limited to 'usr/local/www/vpn_ipsec_mobile.php') diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php deleted file mode 100644 index bb1ef75..0000000 --- a/usr/local/www/vpn_ipsec_mobile.php +++ /dev/null @@ -1,740 +0,0 @@ -= 0) { - if (is_subsystem_dirty('ipsec')) { - clear_subsystem_dirty('ipsec'); - } - } -} - -if ($_POST['submit']) { - - unset($input_errors); - $pconfig = $_POST; - - /* input consolidation */ - - /* input validation */ - - $reqdfields = explode(" ", "user_source group_source"); - $reqdfieldsn = array(gettext("User Authentication Source"), gettext("Group Authentication Source")); - - do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); - - if ($pconfig['pool_enable']) { - if (!is_ipaddr($pconfig['pool_address'])) { - $input_errors[] = gettext("A valid IP address for 'Virtual Address Pool Network' must be specified."); - } - } - if ($pconfig['dns_domain_enable']) { - if (!is_domain($pconfig['dns_domain'])) { - $input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified."); - } - } - if ($pconfig['dns_split_enable']) { - if (!empty($pconfig['dns_split'])) { - /* Replace multiple spaces by single */ - $pconfig['dns_split'] = preg_replace('/\s+/', ' ', trim($pconfig['dns_split'])); - $domain_array = explode(' ', $pconfig['dns_split']); - foreach ($domain_array as $curdomain) { - if (!is_domain($curdomain)) { - $input_errors[] = gettext("A valid split DNS domain list must be specified."); - break; - } - } - } - } - - if ($pconfig['dns_server_enable']) { - if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] && - !$pconfig['dns_server3'] && !$pconfig['dns_server4']) { - $input_errors[] = gettext("At least one DNS server must be specified to enable the DNS Server option."); - } - if ($pconfig['dns_server1'] && !is_ipaddr($pconfig['dns_server1'])) { - $input_errors[] = gettext("A valid IP address for 'DNS Server #1' must be specified."); - } - if ($pconfig['dns_server2'] && !is_ipaddr($pconfig['dns_server2'])) { - $input_errors[] = gettext("A valid IP address for 'DNS Server #2' must be specified."); - } - if ($pconfig['dns_server3'] && !is_ipaddr($pconfig['dns_server3'])) { - $input_errors[] = gettext("A valid IP address for 'DNS Server #3' must be specified."); - } - if ($pconfig['dns_server4'] && !is_ipaddr($pconfig['dns_server4'])) { - $input_errors[] = gettext("A valid IP address for 'DNS Server #4' must be specified."); - } - } - - if ($pconfig['wins_server_enable']) { - if (!$pconfig['wins_server1'] && !$pconfig['wins_server2']) { - $input_errors[] = gettext("At least one WINS server must be specified to enable the DNS Server option."); - } - if ($pconfig['wins_server1'] && !is_ipaddr($pconfig['wins_server1'])) { - $input_errors[] = gettext("A valid IP address for 'WINS Server #1' must be specified."); - } - if ($pconfig['wins_server2'] && !is_ipaddr($pconfig['wins_server2'])) { - $input_errors[] = gettext("A valid IP address for 'WINS Server #2' must be specified."); - } - } - - if ($pconfig['login_banner_enable']) { - if (!strlen($pconfig['login_banner'])) { - $input_errors[] = gettext("A valid value for 'Login Banner' must be specified."); - } - } - - if (!$input_errors) { - $client = array(); - - if ($pconfig['enable']) { - $client['enable'] = true; - } - - if (!empty($pconfig['user_source'])) { - $client['user_source'] = implode(",", $pconfig['user_source']); - } - $client['group_source'] = $pconfig['group_source']; - - if ($pconfig['pool_enable']) { - $client['pool_address'] = $pconfig['pool_address']; - $client['pool_netbits'] = $pconfig['pool_netbits']; - } - - if ($pconfig['net_list_enable']) { - $client['net_list'] = true; - } - - if ($pconfig['save_passwd_enable']) { - $client['save_passwd'] = true; - } - - if ($pconfig['dns_domain_enable']) { - $client['dns_domain'] = $pconfig['dns_domain']; - } - - if ($pconfig['dns_split_enable']) { - $client['dns_split'] = $pconfig['dns_split']; - } - - if ($pconfig['dns_server_enable']) { - $client['dns_server1'] = $pconfig['dns_server1']; - $client['dns_server2'] = $pconfig['dns_server2']; - $client['dns_server3'] = $pconfig['dns_server3']; - $client['dns_server4'] = $pconfig['dns_server4']; - } - - if ($pconfig['wins_server_enable']) { - $client['wins_server1'] = $pconfig['wins_server1']; - $client['wins_server2'] = $pconfig['wins_server2']; - } - - if ($pconfig['pfs_group_enable']) { - $client['pfs_group'] = $pconfig['pfs_group']; - } - - if ($pconfig['login_banner_enable']) { - $client['login_banner'] = $pconfig['login_banner']; - } - - $a_client = $client; - - write_config(); - mark_subsystem_dirty('ipsec'); - - header("Location: vpn_ipsec_mobile.php"); - exit; - } -} - -$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile")); -$shortcut_section = "ipsec"; - -include("head.inc"); -?> - - - - - - -
- -" . gettext("You must apply the changes in order for them to take effect.")); - } - foreach ($a_phase1 as $ph1ent) { - if (isset($ph1ent['mobile'])) { - $ph1found = true; - } - } - if ($pconfig['enable'] && !$ph1found) { - print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".
" . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1")); - } - if ($input_errors) { - print_input_errors($input_errors); - } -?> - - - - - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - /> - - -
-
- -
- :   - -
- :   - -
- -
- - - - - -
- - onclick="pool_change()" /> - -
-
- - - - -
- :  - - / - -
-
- - - - - -
- - /> - -
-
-
- - - - - -
- - /> - -
-
-
-
- - - - - -
- - onclick="dns_domain_change()" /> - -
-
- - - - -
- -
-
- - - - - -
- - onclick="dns_split_change()" /> - -
- -
- - - - -
- -
-
- - - - - -
- - onclick="dns_server_change()" /> - -
-
- - - - - - - - - - - - - -
- #1:  - -
- #2:  - -
- #3:  - -
- #4:  - -
-
- - - - - -
- - onclick="wins_server_change()" /> - -
-
- - - - - - - -
- #1:  - -
- #2:  - -
-
- - - - - -
- - onclick="pfs_group_change()" /> - -
-
- - - - -
- :   - -
-
- - - - - -
- - onclick="login_banner_change()" /> - -
-
- - - - -
- - -
-
  - " /> -
-
-
-
- - - - - - -- cgit v1.1