[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] PATCH: bind to source IP



On Fri, 20 Feb 2015 14:12:51 +0000 (UTC), G H wrote:
Patch is attached to cause msmtp to bind to a source IP address
before connecting to the remote endpoint. This is useful for
source-based routing. Note that DNS lookups will still be going out
your default interface; use a local dnsmasq or IPtables SNATing to
fix this.

On 09.03.15 10:28, Martin Lambers wrote:
I must admit I'm not familiar with the use case of source-based
routing. I once read that one should use SO_BINDTODEVICE if the packets
should go out a specific network interface; is this what you want to
do? If not, could you explain how binding to an IP address is useful;
if yes, could you explain the relation of your patch to SO_BINDTODEVICE?
For example, this article seems to hint at problems:
http://codingrelic.geekhold.com/2009/10/code-snippet-sobindtodevice.html

how will people care about outgoing interface is their business. Yes, it's not always so easy as it seems, however it's easy doable with
source-routing and binding local outgoing IP is the easiest way for msmtp
(and other programs) to help with that.

so, while binding to source IP will not cause packets to go from different
interface by itself, it's needed for it to be done.

--
Matus UHLAR - fantomas, uhlar@...186... ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Silvester Stallone: Father of the RISC concept.