summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-17 17:47:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-17 17:47:21 +0000
commit18116be98550928112158e2bd2d78905ed41f41e (patch)
treee0c75213285ac5745c355affa3b2c1287dc34907 /etc
parent14cf741d18b20fda44fc17d48de9805de947523e (diff)
downloadpfsense-18116be98550928112158e2bd2d78905ed41f41e.zip
pfsense-18116be98550928112158e2bd2d78905ed41f41e.tar.gz
MFC 10443
Only install squid redirect rule when the menu option is checked.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index ba71d6f..dcc3234 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -851,7 +851,11 @@ EOD;
if (is_package_installed("squid") == 1) {
if(is_process_running("squid")) {
- $natrules .= "rdr on \$lan inet proto tcp from any to !{$lanip} port www -> 127.0.0.1 port 3128\n";
+ $transparent_proxy = $config['installedpackages']['squid']['config'][0]['transparent_proxy'];
+ if(isset($transparent_proxy) && ($transparent_proxy == "on")) {
+ $natrules .= "rdr on {$lanif} inet proto tcp from any to !{$lanip} port www -> 127.0.0.1 port 3128\n";
+ }
+ unset($transparent_proxy);
} else {
if($g['booting'] == false) {
log_error("SQUID is installed but failed to start. Not installing redirector rule.");
OpenPOWER on IntegriCloud