From c1ec2c2f80dab2103f497391d0339248239918d5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 6 Nov 2005 20:03:46 +0000 Subject: MFC 7401 Add support for per interface ftp helper. Suggested-by: Dan Swartzendruber In-Discussion-with: Bill M, Dan S --- usr/local/www/interfaces.php | 20 ++++++++++++++++++++ usr/local/www/interfaces_lan.php | 22 +++++++++++++++++++++- usr/local/www/interfaces_opt.php | 21 ++++++++++++++++++++- usr/local/www/interfaces_wan.php | 20 ++++++++++++++++++++ usr/local/www/system_advanced.php | 17 ----------------- 5 files changed, 81 insertions(+), 19 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 3b061b4..9b5b817 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -51,6 +51,8 @@ $pconfig['pptp_remote'] = $config['pptp']['remote']; $pconfig['pptp_dialondemand'] = isset($config['pptp']['ondemand']); $pconfig['pptp_idletimeout'] = $config['pptp']['timeout']; +$pconfig['disableftpproxy'] = isset($wancfg['disableftpproxy']); + $pconfig['bigpond_username'] = $config['bigpond']['username']; $pconfig['bigpond_password'] = $config['bigpond']['password']; $pconfig['bigpond_authserver'] = $config['bigpond']['authserver']; @@ -209,6 +211,15 @@ if ($_POST) { unset($config['bigpond']['authserver']); unset($config['bigpond']['authdomain']); unset($config['bigpond']['minheartbeatinterval']); + unset($wancfg['disableftpproxy']); + + /* per interface pftpx helper */ + if($_POST['disableftpproxy'] == "yes") { + $wancfg['disableftpproxy'] = true; + system_start_ftp_helpers(); + } else { + system_start_ftp_helpers(); + } if ($_POST['type'] == "Static") { $wancfg['ipaddr'] = $_POST['ipaddr']; @@ -687,6 +698,15 @@ function type_change(enable_change,enable_change_pptp) { When set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.
Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. + + + FTP Helper + + onclick="enable_change(false)" /> + Disable the userland FTP-Proxy application +
+ +    
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index 278bfd8..1133335 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -41,6 +41,8 @@ $pconfig['bridge'] = $lancfg['bridge']; $pconfig['bandwidth'] = $lancfg['bandwidth']; $pconfig['bandwidthtype'] = $lancfg['bandwidthtype']; +$pconfig['disableftpproxy'] = isset($lancfg['disableftpproxy']); + /* Wireless interface? */ if (isset($lancfg['wireless'])) { require("interfaces_wlan.inc"); @@ -105,6 +107,16 @@ if ($_POST) { if (!$input_errors) { + unset($lancfg['disableftpproxy']); + + /* per interface pftpx helper */ + if($_POST['disableftpproxy'] == "yes") { + $lancfg['disableftpproxy'] = true; + system_start_ftp_helpers(); + } else { + system_start_ftp_helpers(); + } + $bridge = discover_bridge($lancfg['if'], filter_translate_type_to_real_interface($lancfg['bridge'])); if($bridge <> "-1") { destroy_bridge($bridge); @@ -230,6 +242,14 @@ function enable_change(enable_over) {
The bandwidth setting will define the speed of the interface for traffic shaping. Do not enter your "Internet" bandwidth here, only the physical speed! + + FTP Helper + + onclick="enable_change(false)" /> + Disable the userland FTP-Proxy application +
+ +   @@ -278,4 +298,4 @@ if ($_POST['apply'] <> "") { } -?> \ No newline at end of file +?> diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index bfcaed6..3add7d3 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -61,6 +61,7 @@ $pconfig['blockbogons'] = isset($optcfg['blockbogons']); $pconfig['spoofmac'] = $optcfg['spoofmac']; $pconfig['mtu'] = $optcfg['mtu']; +$pconfig['disableftpproxy'] = isset($optcfg['disableftpproxy']); /* Wireless interface? */ if (isset($optcfg['wireless'])) { @@ -171,6 +172,15 @@ if ($_POST) { } unset($optcfg['dhcphostname']); + unset($optcfg['disableftpproxy']); + + /* per interface pftpx helper */ + if($_POST['disableftpproxy'] == "yes") { + $optcfg['disableftpproxy'] = true; + system_start_ftp_helpers(); + } else { + system_start_ftp_helpers(); + } $optcfg['descr'] = remove_bad_chars($_POST['descr']); $optcfg['bridge'] = $_POST['bridge']; @@ -413,7 +423,16 @@ function type_change(enable_change,enable_change_pptp) {
The bandwidth setting will define the speed of the interface for traffic shaping. Do not enter your "Internet" bandwidth here, only the physical speed! - + + + FTP Helper + + onclick="enable_change(false)" /> + Disable the userland FTP-Proxy application +
+ + +   diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index 3b061b4..9b5b817 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -51,6 +51,8 @@ $pconfig['pptp_remote'] = $config['pptp']['remote']; $pconfig['pptp_dialondemand'] = isset($config['pptp']['ondemand']); $pconfig['pptp_idletimeout'] = $config['pptp']['timeout']; +$pconfig['disableftpproxy'] = isset($wancfg['disableftpproxy']); + $pconfig['bigpond_username'] = $config['bigpond']['username']; $pconfig['bigpond_password'] = $config['bigpond']['password']; $pconfig['bigpond_authserver'] = $config['bigpond']['authserver']; @@ -209,6 +211,15 @@ if ($_POST) { unset($config['bigpond']['authserver']); unset($config['bigpond']['authdomain']); unset($config['bigpond']['minheartbeatinterval']); + unset($wancfg['disableftpproxy']); + + /* per interface pftpx helper */ + if($_POST['disableftpproxy'] == "yes") { + $wancfg['disableftpproxy'] = true; + system_start_ftp_helpers(); + } else { + system_start_ftp_helpers(); + } if ($_POST['type'] == "Static") { $wancfg['ipaddr'] = $_POST['ipaddr']; @@ -687,6 +698,15 @@ function type_change(enable_change,enable_change_pptp) { When set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.
Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. + + + FTP Helper + + onclick="enable_change(false)" /> + Disable the userland FTP-Proxy application +
+ +    
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index 2f39dd5..03a1ade 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -35,7 +35,6 @@ require("guiconfig.inc"); $pconfig['disablefilter'] = $config['system']['disablefilter']; -$pconfig['disableftpproxy'] = $config['system']['disableftpproxy']; $pconfig['rfc959workaround'] = $config['system']['rfc959workaround']; $pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']); $pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr']; @@ -130,14 +129,6 @@ if ($_POST) { system_enable_arp_wrong_if(); } - if($_POST['disableftpproxy'] == "yes") { - $config['system']['disableftpproxy'] = "enabled"; - unset($config['system']['rfc959workaround']); - system_start_ftp_helpers(); - } else { - unset($config['system']['disableftpproxy']); - system_start_ftp_helpers(); - } if($_POST['rfc959workaround'] == "yes") $config['system']['rfc959workaround'] = "enabled"; else @@ -525,14 +516,6 @@ include("head.inc"); Traffic Shaper and Firewall Advanced - FTP Helper - - onclick="enable_change(false)" /> - Disable the userland FTP-Proxy application -
- - - FTP RFC 959 data port violation workaround onclick="enable_change(false)" /> -- cgit v1.1