From owner-freebsd-net@FreeBSD.ORG Thu Feb 14 18:28:57 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7660916A419 for ; Thu, 14 Feb 2008 18:28:57 +0000 (UTC) (envelope-from nlandys@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id 0145E13C455 for ; Thu, 14 Feb 2008 18:28:56 +0000 (UTC) (envelope-from nlandys@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so490206fka.11 for ; Thu, 14 Feb 2008 10:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=BummEsTvjhrnrDpcl6U6fMap2MkXPHd0i+DMg2s48E0=; b=fGl776do0SGFgQLXENLXa5GG1NxqPgFh/dX6u9a6MZxn/TVe+oAUn36dUxKsa0YOKDUB9KUC/f5vKbSQgQUKa019iWEE24VeVZqMhce16GwuDAFGDuli8zUZmhQRFL6AdVAZdTRnUATszyaPv2q6SgMIwiqYJBNzUzvlVCOsKR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=IcSnbT8D8yV+W/OI4xiOppwUiulFDrxk+7EYxpZo3CtAZkeXK5Egy5caxWTAe40ttPuNTq0cGrqTRVYxeiA+IvrmV+Exo+IwLQ1FVUCP8jYN3rMABL8emxLN6awzaXTHGPxMKpRXJ1UwG2CbhctbGON18VXO2+szYzx/MkFzPeU= Received: by 10.82.174.20 with SMTP id w20mr2966405bue.21.1203011999198; Thu, 14 Feb 2008 09:59:59 -0800 (PST) Received: by 10.82.160.20 with HTTP; Thu, 14 Feb 2008 09:59:59 -0800 (PST) Message-ID: <560f92640802140959u69cce9dbuef5c59738a946685@mail.gmail.com> Date: Thu, 14 Feb 2008 09:59:59 -0800 From: "Nerius Landys" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: PF firewall NAT and Windows IPSEC tunnel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2008 18:28:57 -0000 Howdy folks. I have several computers behind a FreeBSD router (NAT 192.168.0.x using OpenBSD's PF) . One of those computers is a Windows machine which is using software called "Cisco Systems VPN Client" to connect to some other computers outside of our internal network. Our FreeBSD router's connection to the outside world is DHCP via cable modem. I can connect the Windows machine directly to the cable modem, bypassing the FreeBSD router entirely; the VPN works fine in this case. However, when I try going through the FreeBSD router I get dropped VPN connections after four to eight minutes; the VPN works fine only when it first connects and for five minutes thereafter. Secure VPN Connection terminated locally by the client. Reason 412: The remote peer is no longer responding. We contacted the administrator on the other side and he said to do the following: The following ports should be allowed through the local firewall: UDP port 500, port 10000 ESP all ports AH all ports I'm not quite sure what this means. My original /etc/pf.conf: ext_if="fxp0" int_if="fxp3" internal_net="192.168.0.0/24 nat on $ext_if from $internal_net to any -> ($ext_if) and I added these three lines in trying to follow the administrator's instructions (the Windows machine is 192.168.0.3): rdr on $ext_if proto udp from any to ($ext_if) port {500,10000} -> 192.168.0.3 rdr on $ext_if proto esp from any to ($ext_if) -> 192.168.0.3 rdr on $ext_if proto ah from any to ($ext_if) -> 192.168.0.3 But the VPN connections still get dropped after five minutes. Any ideas? I'm also running a bridge between several network interfaces. My /etc/sysctl.conf looks like this: net.link.ether.bridge.enable=1 net.link.ether.bridge.config=em0,em1,fxp1,fxp2,fxp3 The interesting lines from /etc/rc.conf are: ifconfig_fxp0="DHCP" ifconfig_fxp3="inet 192.168.0.254 netmask 255.255.255.0"