From owner-freebsd-net@FreeBSD.ORG Sat Feb 25 07:07:27 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 5762D16A420 for ; Sat, 25 Feb 2006 07:07:27 +0000 (GMT) (envelope-from edwin@mavetju.org) Received: from mail2out.barnet.com.au (mail2out.barnet.com.au [202.83.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBB7143D45 for ; Sat, 25 Feb 2006 07:07:26 +0000 (GMT) (envelope-from edwin@mavetju.org) Received: by mail2out.barnet.com.au (Postfix, from userid 27) id 4A0C47073CB; Sat, 25 Feb 2006 18:07:24 +1100 (EST) X-Viruscan-Id: <4400022C0000CA9C777732@BarNet> Received: from mail2-auth.barnet.com.au (mail2.barnet.com.au [202.83.176.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.barnet.com.au", Issuer "BarNet Root Certificate Authority" (verified OK)) by mail2.barnet.com.au (Postfix) with ESMTP id 115457073D1 for ; Sat, 25 Feb 2006 18:07:24 +1100 (EST) Received: from k7.mavetju (edwin-3.int.barnet.com.au [10.10.12.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail2-auth.barnet.com.au (Postfix) with ESMTP id 9397B7073B1 for ; Sat, 25 Feb 2006 18:07:23 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id B30BE1F4; Sat, 25 Feb 2006 18:07:22 +1100 (EST) Date: Sat, 25 Feb 2006 18:07:22 +1100 From: Edwin Groothuis To: freebsd-net@freebsd.org Message-ID: <20060225070722.GA92618@k7.mavetju> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: socket / bind - specific address 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: Sat, 25 Feb 2006 07:07:27 -0000 The situation is as follows: We have a couple of FreeBSD routers, with RFC1918 addresses on the ethernets and a public address on the loopback. This works fine for connecting to the routers, but is problematic for locally originated outgoing traffic (think NTP, think syslog): it takes the IP address of the outgoing interface, which is the RFC1918 address. Is there a way (sysctl, kernel option) to define which IP address is used for locally originated outgoing traffic? Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/