Re: socket / bind - specific address



On Sat, Feb 25, 2006 at 02:28:46PM +0000, 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.

I'm surely going to try this and see if it works.

Edwin
--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin@xxxxxxxxxxx | Weblog: http://weblog.barnet.com.au/edwin/
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: socket / bind - specific address
    ... We have a couple of FreeBSD routers, ... One way is to run your daemon (ntpd, syslogd etc) within a jail, and give ... the jail your public loopback as its IP address. ...
    (freebsd-net)
  • Re: Jails and IP Aliasing
    ... using firewall rules to redirect the traffic accordingly. ... Something like a loopback address inside the jail. ...
    (freebsd-questions)
  • Re: Jails and loopback interfaces
    ... I would recommend *not* trying to use 127.0.0.1. ... situation where things are trying to access the local machine and are ... just as you would with any other jail. ... For access loopback inside the jail, is necessary configure in host server ...
    (FreeBSD-Security)
  • Re: Jails and loopback interfaces
    ... For access loopback inside the jail, is necessary configure in host server ... test-jail setup confirms this on 6.1-PRERELEASE: ...
    (FreeBSD-Security)
  • RE: Jails and loopback interfaces
    ... good idea to use localhost as a jail IP. ... Use only loopback ... IPs (other than localhost), like the example that I wrote ... adapter and using the localhost IP. ...
    (FreeBSD-Security)