From owner-freebsd-net@FreeBSD.ORG Thu Apr 21 14:52:08 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31F8E16A4CE for ; Thu, 21 Apr 2005 14:52:08 +0000 (GMT) Received: from mx.netvision.com.br (nv-230-249.netvision.com.br [200.247.230.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9978E43D45 for ; Thu, 21 Apr 2005 14:52:06 +0000 (GMT) (envelope-from andre@netvision.com.br) Received: from av.netvision.com.br (localhost [127.0.0.1]) by mailer.netvision.com.br (Postfix) with ESMTP id 3029C3C321C for ; Thu, 21 Apr 2005 11:52:04 -0300 (BRT) Received: from mx.netvision.com.br ([127.0.0.1]) by av.netvision.com.br (av [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id 52758-03 for ; Thu, 21 Apr 2005 11:52:04 -0300 (BRT) Received: from mail.server.home (unknown [200.138.213.47]) by mx.netvision.com.br (Postfix) with ESMTP id 4640F3B266E for ; Thu, 21 Apr 2005 11:52:03 -0300 (BRT) Received: by mail.server.home (Postfix, from userid 0) id 095D460F6; Thu, 21 Apr 2005 14:52:56 +0000 (UTC) Date: Thu, 21 Apr 2005 14:52:56 +0000 From: Andre To: freebsd-net@freebsd.org Message-ID: <20050421145256.GA50738@server.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: by amavisd-new at netvision.com.br Subject: How to set the source IP of TCP connections? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 21 Apr 2005 14:52:08 -0000 How can I open a TCP connection with a source IP address that's not configured on the machine? I've created a proxy (like Squid but for another protocol), and I use ipfw fwd to get the client's TCP connections to this proxy. The problem is that the connections that the proxy open have the source IP address of the machine where the proxy is running on. What I'd like to do is to use the IP address of the client as the source IP address of connections opened by the proxy for that client. Any way to do this in FreeBSD 4 or 5?