diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-03 04:38:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-03 04:38:46 +0000 |
commit | f6ded420af0b3ec8ff60705b28e60afd7ea814f8 (patch) | |
tree | 7424a26224abddec84fa3e6951ce815f71a32c44 /etc | |
parent | d1d6fdf30bebf8b46ae7e7d91f0e87b2b3e7d746 (diff) | |
download | pfsense-f6ded420af0b3ec8ff60705b28e60afd7ea814f8.zip pfsense-f6ded420af0b3ec8ff60705b28e60afd7ea814f8.tar.gz |
Add static-port option for outbound NAT
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index ed2ab19..14c190a 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -388,8 +388,14 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = " $target = "-> {$tgt}"; } + /* outgoing static-port option, hamachi, Grandstream, VOIP, etc */ + if($staticnatport) + $staticnatport_txt = " static-port"; + else + $staticnatport_txt = ""; + /* Put all the pieces together */ - $natrule = "{$nat} on {$if} from {$src} to {$dst} {$target}\n"; + $natrule = "{$nat} on {$if} from {$src} to {$dst} {$target}{$staticnatport_txt}\n"; return $natrule; } |