X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mail-route;h=428972094d11ccff467d48d03b416a364e6127ec;hb=e256742f75e1127266e4ce1e2a871a81a72bc84a;hp=11f92c60513709bd9b400bb61a00879745034edd;hpb=2d3ce30754a3f24d922635647bab4990b60f5c27;p=distro-setup diff --git a/mail-route b/mail-route index 11f92c6..4289720 100755 --- a/mail-route +++ b/mail-route @@ -21,7 +21,7 @@ usage() { cat <<'EOF' Usage: mail-route up|down|show -Marks tcp packets on port 25 and 143 to be routed through +Marks tcp packets on port 25, 143 and 587 to be routed through a vpn ip. If called from --up/--down in openvpn, (we have multiple args) $1 is the tun_dev, and action is from $script_type. @@ -115,7 +115,7 @@ iptmod() { #iptables modify modify() { # match source or dest port. note, when we send to a port, it picks a random high port as # the source. - for port in 25 143; do # smtp and imap. + for port in 25 143 587; do # smtp and imap. iptcommon="OUTPUT -m tcp -p tcp -m multiport --ports $port -j MARK --set-mark" iptmod iptables -t mangle $iptables_op $iptcommon 0x1 iptmod iptables -t mangle $iptables_op $iptcommon 0x0 -d 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16