From 0267378f494fa725e820dc27c6800adcf9852829 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 6 Jun 2005 19:18:33 +0000 Subject: Add others category which includes: * IPSEC * MSRDP * PPTP --- usr/local/www/wizards/traffic_shaper_wizard.xml | 136 +++++++++++++++++++++++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/usr/local/www/wizards/traffic_shaper_wizard.xml b/usr/local/www/wizards/traffic_shaper_wizard.xml index c53aced..786e3e7 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.xml +++ b/usr/local/www/wizards/traffic_shaper_wizard.xml @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -6 +7 1 pfSense Traffic Shaper Wizard @@ -787,6 +787,140 @@ 6 pfSense Traffic Shaper Wizard + true + Other Application + + + Enable + checkbox + Other networking protocols + This will help raise the priority of other protocols higher than most traffic. + MSRDP + true + + + Enable/Disable other protocols + listtopic + + + MSRDP + checkbox + Microsoft Remote Desktop Protocol + + + PPTP + checkbox + Microsoft Point to Point tunneling protocol + + + IPSEC + checkbox + IPSEC VPN traffic + + + Next + submit + + + + if ( $_POST['enable'] ) { + /* create qOthersUp queue */ + $queue = array(); + $queue['name'] = "qOthersUp"; + $queue['associatedrule'] = 0; + $queue['priority'] = 5; + $queue['red'] = "on"; + $queue['ecn'] = "on"; + $queue['realtime'] = "on"; + $queue['realtime1'] = "1Kb"; + $queue['realtime2'] = "1"; + $queue['realtime3'] = "1Kb"; + $queue['upperlimit'] = "on"; + $queue['upperlimit1'] = "90%"; + $queue['upperlimit2'] = "1"; + $queue['upperlimit3'] = "90%"; + $queue['linkshare'] = "on"; + $queue['linkshare1'] = "1%"; + $queue['linkshare2'] = "1"; + $queue['linkshare3'] = "1%"; + $queue['bandwidth'] = "0"; + $queue['bandwidthtype'] = "Kb"; + $queue['attachtoqueue'] = "qWANRoot"; + $config['shaper']['queue'][] = $queue; + + /* create qOthersDown queue */ + $queue = array(); + $queue['name'] = "qOthersDown"; + $queue['associatedrule'] = 0; + $queue['priority'] = 5; + $queue['red'] = "on"; + $queue['ecn'] = "on"; + $queue['realtime'] = "on"; + $queue['realtime1'] = "1Kb"; + $queue['realtime2'] = "1"; + $queue['realtime3'] = "1Kb"; + $queue['upperlimit'] = "on"; + $queue['upperlimit1'] = "90%"; + $queue['upperlimit2'] = "1"; + $queue['upperlimit3'] = "90%"; + $queue['linkshare'] = "on"; + $queue['linkshare1'] = "1%"; + $queue['linkshare2'] = "1"; + $queue['linkshare3'] = "1%"; + $queue['bandwidth'] = "0"; + $queue['bandwidthtype'] = "Kb"; + $queue['attachtoqueue'] = "qLANRoot"; + $config['shaper']['queue'][] = $queue; + + /* MSRDP */ + $othersplist[] = array('MSRDP','tcp','3389','3389','both'); + + /* PPTP */ + $othersplist[] = array('PPTP','tcp','1723','1723','both'); + $othersplist[] = array('PPTPGRE','gre','','','both'); + + /* IPSEC */ + $othersplist[] = array('IPSEC','tcp','500','500','both'); + + /* XXX: add some more protocols here! */ + + /* Set up/down protocols as higher weight */ + /* loop through othersplist[] */ + foreach ($othersplist as $otherclient) { + foreach (array('source','destination') as $srcdest) { + $rule = array(); + if ($srcdest == 'source') { + $destsrc = 'destination'; + $rule['outqueue'] = 'qOthersUp'; + $rule['inqueue'] = 'qOthersDown'; + $rule['interface'] = 'lan'; + $rule['source']['network'] = 'lan'; + $rule['destination']['any'] = TRUE; + $rule['descr'] = "m_Oth {$otherclient[0]} outbound"; + } else { + $destsrc = 'source'; + $rule['outqueue'] = 'qOthersDown'; + $rule['inqueue'] = 'qOthersUp'; + $rule['interface'] = 'wan'; + $rule['source']['any'] = TRUE; + $rule['destination']['network'] = 'lan'; + $rule['descr'] = "m_Oth {$otherclient[0]} inbound"; + } + + $rule['destination']['port'] = $otherclient[2]."-".$otherclient[3]; + if($otherclient[1] != '') + $rule['protocol'] = $otherclient[1]; + + $config['shaper']['rule'][] = $rule; + } + } + + } + + + + 7 + pfSense Traffic Shaper Wizard Summary -- cgit v1.1