From 021b77af58a0fd0e6f9b3be52db098091690eb3e Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 9 Mar 2011 13:54:10 -0500 Subject: If PPTP is set for redir, actually add the NAT rules to rdr. --- etc/inc/filter.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 8f98004..2e91944 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1540,6 +1540,16 @@ function filter_nat_rules_generate() { else sigkillbypid("/var/run/inetd.pid", "HUP"); } + + if (isset($config['pptpd']['mode']) && ($config['pptpd']['mode'] != "off")) { + if ($config['pptpd']['mode'] == "redir") { + $pptpdtarget = $config['pptpd']['redir']; + $natrules .= "# PPTP\n"; + $natrules .= "rdr on \$WAN proto gre from any to any -> {$pptpdtarget}\n"; + $natrules .= "rdr on \$WAN proto tcp from any to any port 1723 -> {$pptpdtarget}\n"; + } + } + $natrules .= discover_pkg_rules("nat"); $natrules .= filter_process_carp_nat_rules(); -- cgit v1.1