Web lists-archives.com

Source-specific routing




Hi,

I don’t know if this is the right place to ask, if my problem is not too specific or something.

Is source-specific routing possible under debian? I think this is what I need in my case ("multihoming" I think): on my laptop I'm generally connected too zero up to two differents networks (from different ISP), and therefore have from 0 to 6-7 different IP addresses (currently: two local IPv4 addresses and two public IPv6 addresses from my physical home ISP (possibly counting the public IPv4 whose my NATed network is behind and that I could use modulo some config and negotiations with flatmate), and two public IP addresses (v6 and v4) from a VPN: misleadingly, that's 3 network interfaces: one (tun0) for my VPN ISP, and two (enp0s25 and wlp2s0) for my physical home ISP).

I host my mail server on this machine (my laptop yes, though it is not always up (it stays on during night, but is offline when I travel sometimes, between two different places with internet access, but this wasn't the case at the time I had an unlimited 3G data access through a WWAN card (I need to get and fit another one now)).

I'd like my computer to be able to receive mail from all network interfaces (including local networks) at any time, and preferably send from the VPN (tun0, openvpn, and I connect through Network Manager), but possibly also from my home physical ISP when available (without disconnecting from my VPN, if I'm ever connected to it), and to be able to change the default route for opening connections (for exemple accessing web or FTP services from a local network (intranet), as I need to in my college).

So I guess source-specific routing is what I need, so that for any connection using any IP my computer send the packet on the right interface with the right IP.

I feel like that's an interesting networking problem for learning networking stuff as I'd like ^^

So any idea? place to find information?