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

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



It does appear additional work is needed to make it go out the correct interface. I only tested with IP aliases (eth0:2, eth0:3), where the default route is out eth0. To reproduce: 


# ifconfig dummy0 10.10.0.1 netmask 255.255.255.255

# iptables -I OUTPUT -o dummy0 -j LOG --log-prefix "dummy0-out: "
# echo test | ./src/msmtp -f test@...18... --source-host=10.10.0.1 --host=gmail.com --port=25 nobody@...45...

You will see traffic from source 10.10.0.1 via tcpdump, but iptables will not be blocking any traffic.

--G H



----- Original Message -----
From: Matus UHLAR - fantomas <uhlar@...186...>
To: msmtp-users@lists.sourceforge.net
Cc: 
Sent: Wednesday, March 11, 2015 3:04 PM
Subject: Re: [msmtp-users] PATCH: bind to source IP

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.