diff --git a/STABLE/firewall b/STABLE/firewall index e0fd1929a..f025da6e8 100755 --- a/STABLE/firewall +++ b/STABLE/firewall @@ -1257,11 +1257,11 @@ setup_tunnels() # $1 = name of tunnels file echo " PPTP tunnel to $1 defined." } - setup_pptp_server() + setup_pptp_server() # $1 = gateway { - addrule $inchain -p 47 -j ACCEPT - addrule $outchain -p 47 -j ACCEPT - addrule $inchain -p tcp --dport 1723 -j ACCEPT + addrule $inchain -p 47 -s $1 -j ACCEPT + addrule $outchain -p 47 -d $1 -j ACCEPT + addrule $inchain -p tcp --dport 1723 -s $1 -j ACCEPT echo " PPTP server defined." } @@ -1329,6 +1329,7 @@ setup_tunnels() # $1 = name of tunnels file if validate_zone $z; then inchain=${z}2${FW} outchain=${FW}2${z} + gateway=${gateway:-0.0.0.0/0} case $kind in ipsec|IPSEC) setup_one_ipsec $gateway ipsec $z1 @@ -1349,7 +1350,7 @@ setup_tunnels() # $1 = name of tunnels file setup_pptp_client $gateway ;; pptpserver|PPTPSERVER) - setup_pptp_server + setup_pptp_server $gateway ;; openvpn|OPENVPN|openvpn:*|OPENVPN:*) setup_one_openvpn $gateway $kind diff --git a/STABLE2/firewall b/STABLE2/firewall index bc5396bc7..53ed49d5b 100755 --- a/STABLE2/firewall +++ b/STABLE2/firewall @@ -1601,8 +1601,8 @@ setup_tunnels() # $1 = name of tunnels file pptpclient|PPTPCLIENT) setup_pptp_client $gateway ;; - pptpserver|PPTPSERVER) $gateway - setup_pptp_server + pptpserver|PPTPSERVER) + setup_pptp_server $gateway ;; openvpn|OPENVPN|openvpn:*|OPENVPN:*) setup_one_openvpn $gateway $kind diff --git a/Shorewall2/firewall b/Shorewall2/firewall index f34208c11..6965fbc1c 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -1694,8 +1694,8 @@ setup_tunnels() # $1 = name of tunnels file pptpclient|PPTPCLIENT) setup_pptp_client $gateway ;; - pptpserver|PPTPSERVER) $gateway - setup_pptp_server + pptpserver|PPTPSERVER) + setup_pptp_server $gateway ;; openvpn|OPENVPN|openvpn:*|OPENVPN:*) setup_one_openvpn $gateway $kind