summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-12 18:48:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-12 18:48:34 +0000
commit95716d76e206b6a26771c5295051a04cb2a1f60e (patch)
tree390fec171476d32adc67b4bff00ab53da9741151 /etc
parent637acd3667eb35c9a25136e92d3627bb61843119 (diff)
downloadpfsense-95716d76e206b6a26771c5295051a04cb2a1f60e.zip
pfsense-95716d76e206b6a26771c5295051a04cb2a1f60e.tar.gz
* Handle tcp and udp protocols correctly on reflection
* Remove XXX since we now handle port ranges on reflection
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 9837d98..fae5b0b 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -690,11 +690,15 @@ function filter_nat_rules_generate() {
for($x=$extport[0]; $x<$range_end; $x++) {
- /* XXX: need to handle port ranges somehow */
- fwrite($fd, "{$starting_localhost_port}\tstream\t{$rule['protocol']}\tnowait\tnobody\t/usr/bin/nc nc -w 20 {$target} {$x}\n");
+ if($rule['protocol'] == "tcp/udp")
+ $protocol = "{ tcp udp }";
+ else
+ $protocol = $rule['protocol'];
+
+ fwrite($fd, "{$starting_localhost_port}\tstream\t{$protocol}\tnowait\tnobody\t/usr/bin/nc nc -w 20 {$target} {$x}\n");
$natrules .=
- "rdr on {$ifname_real} proto {$rule['protocol']} from any to {$extaddr} port { {$x} } -> 127.0.0.1 port {$starting_localhost_port}\n";
+ "rdr on {$ifname_real} proto {$protocol} from any to {$extaddr} port { {$x} } -> 127.0.0.1 port {$starting_localhost_port}\n";
$starting_localhost_port++;
OpenPOWER on IntegriCloud