From 64bb79715f3749bf5bc89db5b69167192badf8d1 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 25 Jan 2005 00:55:45 +0000 Subject: [PATCH] add rule labels --- etc/inc/filter.inc | 86 ++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 5935ac1613..d63f2c6bfd 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -771,7 +771,7 @@ function filter_nat_rules_generate() { # PPTP #rdr on $wanif proto gre from any to any port 0 -> $pptpdtarget -rdr on $wanif proto tcp from any to any port 1723 -> $pptpdtarget +rdr on $wanif proto tcp from any to any port 1723 -> $pptpdtarget label "pptp port 1723" EOD; } @@ -779,7 +779,7 @@ EOD; $squid_installed = run_command_return_string("/bin/ls /var/db/pkg/ | grep squid"); if ($squid_installed <> "") { - $natrules .= "rdr on " . $lanif . " inet proto tcp from any to any port www -> 127.0.0.1 port 3128\n"; + $natrules .= "rdr on " . $lanif . " inet proto tcp from any to any port www -> 127.0.0.1 port 3128 label \"squid transparent proxy\"\n"; } return $natrules; @@ -861,30 +861,30 @@ function filter_rules_generate() { /* if carp is defined, lets pass the traffic */ if(is_carp_defined() == 1) { - $ipfrules .= "pass on " . $lanif . " proto carp keep state\n"; - $ipfrules .= "pass on " . $wanif . " proto carp keep state\n"; + $ipfrules .= "pass on " . $lanif . " proto carp keep state label \"carp\"\n"; + $ipfrules .= "pass on " . $wanif . " proto carp keep state label \"carp\"\n"; } /* if squid is installed, lets install its rule */ $squid_installed = run_command_return_string("/bin/ls /var/db/pkg/ | grep squid"); if ($squid_installed <> "") { - $ipfrules .= "pass in on " . $lanif . " inet proto tcp from any to 127.0.0.1 port 3128 keep state\n"; - $ipfrules .= "pass out on " . $wanif . " inet proto tcp from any to any port www keep state\n"; + $ipfrules .= "pass in on " . $lanif . " inet proto tcp from any to 127.0.0.1 port 3128 keep state label \"transparent proxy\"\n"; + $ipfrules .= "pass out on " . $wanif . " inet proto tcp from any to any port www keep state label \"transparent proxy\"\n"; } $ipfrules .= <<