socket / bind - specific address

Vince Hoffman jhary at unsane.co.uk
Sat Feb 25 13:43:50 PST 2006


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>


More information about the freebsd-net mailing list