From owner-freebsd-net@FreeBSD.ORG Sat Feb 25 21:43:50 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 9209D16A420 for ; Sat, 25 Feb 2006 21:43:50 +0000 (GMT) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (unsane.co.uk [62.140.220.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80F7D43D70 for ; Sat, 25 Feb 2006 21:43:46 +0000 (GMT) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (localhost [127.0.0.1]) by unsane.co.uk (8.13.5/8.13.3) with ESMTP id k1PLhrAc011955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2006 21:43:54 GMT (envelope-from jhary@unsane.co.uk) Received: from localhost (jhary@localhost) by unsane.co.uk (8.13.5/8.13.3/Submit) with ESMTP id k1PLhoD9011949; Sat, 25 Feb 2006 21:43:51 GMT (envelope-from jhary@unsane.co.uk) Date: Sat, 25 Feb 2006 21:43:50 +0000 (GMT) From: Vince Hoffman To: Brian Candler In-Reply-To: <20060225142846.GA70376@uk.tiscali.com> Message-ID: <20060225214024.U11854@unsane.co.uk> References: <20060225070722.GA92618@k7.mavetju> <20060225142846.GA70376@uk.tiscali.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, Edwin Groothuis Subject: Re: 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 21:43:50 -0000 On Sat, 25 Feb 2006, Brian Candler wrote: > On Sat, Feb 25, 2006 at 06:07:22PM +1100, Edwin Groothuis wrote: >> 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? > > One way is to run your daemon (ntpd, syslogd etc) within a jail, and give > the jail your public loopback as its IP address. > > Another is just to configure each daemon to bind to the appropriate port, if > it supports that option. syslogd has a '-b' flag; I don't know if ntpd can > be configured thusly. I seem to recall openntpd can be but I dont think the standard freebsd ntpd can. I have never tried openntpd on freebsd though (it is in ports.) http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd.conf&sektion=5&arch=&apropos=0&manpath=OpenBSD+Current Vince > > Regards, > > Brian. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >