Linux routing fun

Thomas Charron twaffle at gmail.com
Tue Oct 9 15:00:37 EDT 2007


On 10/9/07, Ben Scott <dragonhawk at gmail.com> wrote:
> On 10/9/07, Brian <brk-gnhlug at karas.net> wrote:
> > However, all the outbound connections seem to originate from the
> > lowest numbered IP on the /28 subnet.
>   Right.  Unless a program takes explicit action to bind its socket to
> a particular IP address, the kernel router will choose the source IP
> address for it.  (Generally, the kernel will pick the IP address of
> the interface "closest" (in terms of the kernel IP routing table) to
> the destination.)
>   I'm not sure if Thomas Charron's suggestion of ProxySourceAddress
> will work for your needs either.  It would depend on how
> ProxySourceAddress is implemented.  But quite often, such things
> specify a global option.  So you'll be able to change everyone's

  Umm, that's exactly what ProxySourceAddress does.  :-)

+                apr_socket_bind(*newsock, conf->bind_addr) != APR_SUCCESS) {

  The bind_addr is the option for ProxySourceAddress, so the outgoing
request when ProxySourceAddress is specified will try to use the IP
given.  It's configuration is local to the definition, so if in a
VirtualHost, it will use a different one for each VirtualHost.

-- 
-- Thomas


More information about the gnhlug-discuss mailing list