[mythtv-users] OT: default routes

Simon Hobson linux at thehobsons.co.uk
Wed Sep 23 06:56:23 UTC 2015


Hika van den Hoven <hikavdh at gmail.com> wrote:

> Since recent I have a second internet connection and am playing around
> with default routes. (only € 10 including phone!)
> I need my first connection because it has a solid IP to connect to by
> VPN but the second is a little bit faster. So I thought of setting my
> default route on the second. But now vpn won't connect anymore. Any
> thoughts on where to look?

You need "rule based routes" or "policy routing".

Basically the default route means "if there wasn't anything more specific found, then send the packet this way", and only one will be active at a time (there may be more than one defined, but priorities will determine which one actually gets to route traffic).

So if you want to route *just* the VPN traffic via one provider, and everything else via the new provider, then you need routes like this :
If traffic is for the VPN itself (ie the encapsulated and control packets with the other endpoint), send via A
If traffic is for the other end of the VPN tunnel, send via A
(Default) send via B

(Assuming you're using GNU/Linux for your router) I've not done this myself natively with iptables, I usually use Shorewall for my firewall setups.

http://www.shorewall.net/MultiISP.html
http://www.shorewall.net/manpages/shorewall-providers.html
http://www.shorewall.net/FAQ.htm#MultiISP


More information about the mythtv-users mailing list