From owner-freebsd-pf@FreeBSD.ORG Tue Mar 22 09:23:00 2011 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33690106564A for ; Tue, 22 Mar 2011 09:23:00 +0000 (UTC) (envelope-from andy@time-domain.co.uk) Received: from mail.time-domain.co.uk (81-179-248-237.static.dsl.pipex.com [81.179.248.237]) by mx1.freebsd.org (Postfix) with ESMTP id ACB5A8FC17 for ; Tue, 22 Mar 2011 09:22:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.time-domain.co.uk (8.14.3/8.14.3) with ESMTP id p2M8wKLL007659 for ; Tue, 22 Mar 2011 08:58:20 GMT Date: Tue, 22 Mar 2011 08:58:20 +0000 (GMT) From: andy thomas X-X-Sender: andy-tds@mail.time-domain.co.uk To: freebsd-pf@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: clamav-milter 0.96.5 at mail X-Virus-Status: Clean Subject: PF port forward problem with Sonicwall VPN (revisited) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 09:23:00 -0000 At the end of January I posted this message (see below) regarding a problem with forwarding incoming traffic on port 444 to an internal IP address on port 443. At the time I didn't get very far with this and the problem "went off the boil" a bit after we upgraded the ShrewSoft VPN installations on the remote Windows PCs to the latest available version and this works fine with the existing IPSec installation on the firewall, which has taken the pressure off me. But I've now started looking at the problem afresh and after logging into the Sonicwall VPN appliance's web interface from a local PC, there is a diagnostic ping utility on the Sonicwall - it is possible to ping the internal firewall interface vr1 (which uses the IP address 192.168.30.1) but attempts to ping the external interface on vr0 or any external address fail. The pf ruleset remains as before: ext_if="vr0" (external IP address) int_if="vr1" (192.168.30.1) sonicwall="192.168.30.28" rdr pass log on $ext_if proto tcp from any to $ext_if port 444 -> $sonicwall port 443 An almost identical rule is used for a webmail server except that there is no port address translation (ie, external port 443 forwards directly to internal port 443) and this has no problems. Clearly something is missing from my Sonicwall rule that is blocking traffic from the Sonicwall to the external interface - as I'm doing PAT as well as NAT in this instance, do I need to add an additional rule(s)? Andy ---------- Forwarded message ---------- Date: Fri, 28 Jan 2011 08:49:27 +0000 (GMT) From: andy thomas To: freebsd-pf@freebsd.org Subject: PF port forward problem with Sonicwall VPN I'm maintaining some OpenBSD-based firewalls and have been really stumped with a problem when trying to add a Sonicwall VPN appliance behind the firewall, and thought I'd ask here for help. The Sonicwall device uses SSL on port 443 for it's external VPN traffic and listens on other ports for internal LAN traffic and it uses a single network interface for this. On our installation, there is a webmail server behind the firewall listening on port 443 and the existing PF rule for this is (abbreviated for clarity): ext_if="vr0" int_if="vr1" webmail="192.168.30.14" rdr pass log on $ext_if proto tcp from any to $ext_if port 443 -> $webmail port 443 This works fine so as external port 443 is already in use for webmail, I decided to use external port 444 for the Sonicwall and added these two extra rules: sonicwall="192.168.30.28" rdr pass log on $ext_if proto tcp from any to $ext_if port 444 -> $sonicwall port 443 However, the Sonicwall cannot be accessed from the external port 444 although it can be accessed internallt on port 443 of course. I have tested this rule by changing it to point to the webmail server like this: rdr pass log on $ext_if proto tcp from any to $ext_if port 444 -> $webmail port 443 and this works fine as I can access webmail on port 444. But why can't I access the Sonicwall on port 444? Does anyone know if the Sonicwall uses additional ports or has anyone got this device to with with a PF-based firewall? Thanks in advance for any suggestions, Andy