From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 3 15:40:19 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDEB616A4CE for ; Tue, 3 Aug 2004 15:40:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9470443D48 for ; Tue, 3 Aug 2004 15:40:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i73FeJNM069889 for ; Tue, 3 Aug 2004 15:40:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i73FeJPa069888; Tue, 3 Aug 2004 15:40:19 GMT (envelope-from gnats) Resent-Date: Tue, 3 Aug 2004 15:40:19 GMT Resent-Message-Id: <200408031540.i73FeJPa069888@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lawrence Farr Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99D9616A4CE for ; Tue, 3 Aug 2004 15:35:32 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E39143D5C for ; Tue, 3 Aug 2004 15:35:32 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i73FZV2O007056 for ; Tue, 3 Aug 2004 15:35:31 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i73FZVEq007055; Tue, 3 Aug 2004 15:35:31 GMT (envelope-from nobody) Message-Id: <200408031535.i73FZVEq007055@www.freebsd.org> Date: Tue, 3 Aug 2004 15:35:31 GMT From: Lawrence Farr To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/69954: PF Nat with a PPP connection uses wrong addresses X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 15:40:20 -0000 >Number: 69954 >Category: misc >Synopsis: PF Nat with a PPP connection uses wrong addresses >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 03 15:40:19 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Lawrence Farr >Release: -CURRENT >Organization: EPC Direct >Environment: FreeBSD mollie.epcdirect.co.uk 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Fri Jul 23 01:48:06 BST 2004 root@buildhost.int.epcdirect.co.uk:/usr/obj/usr/src/sys/ROUTER i386 >Description: When using PF's NAT with a PPP dialup, the wrong outgoing address is used by NAT in a round robin form. PF rule nat on $ext_if from $internal_net to any -> ($ext_if) (Where $ext_if=tun0) PPP config line: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0 Becomes tun0: flags=8051 mtu 1500 inet 10.0.0.1 --> 10.0.0.2 netmask 0xffffffff And when connected: tun0: flags=8051 mtu 1500 inet 213.122.204.66 --> 213.120.208.171 netmask 0xffffffff A tcpdump of a succesful connection shows: 21:40:53.176154 IP 213.122.204.66.61726 > 195.10.242.32.110: . ack 82 win 17296 21:40:53.176325 IP 213.122.204.66.61726 > 195.10.242.32.110: F 7:7(0) ack 82 win 17296 But the next connection shows: 21:40:58.187545 IP 10.0.0.1.62059 > 195.10.242.32.110: S 2862758557:2862758557(0) win 16384 21:41:01.174007 IP 10.0.0.1.62059 > 195.10.242.32.110: S 2862758557:2862758557(0) win 16384 Note the source address has become the original address for the PPP connection. >How-To-Repeat: Connect with the ppp config line as shown above and the pf rule and try sequential connections through the NAT router. >Fix: Set NAT to use a specific address rather than tun0 nat on $ext_if from $internal_net to any -> 213.122.204.66 and the problem stops. This is a problem if you get a dynamic IP address. >Release-Note: >Audit-Trail: >Unformatted: