Linux – Route certain domains through different interfaces

linuxnetworkingopenvpnrouting

Is there a simple way to route certain domains (i.e. debian.org) through a different network interface. Here is the situation. I have a server with two interfaces eth0 going to the local network and tun0 going to an openvpn network. I would like to have all requests going to *.debian.org go out tun0 and the rest go through eth0. Is there a simple way to do this using names as opposed to ip addresses?

Best Answer

Not so much. The routing system is definitely IP based and names have no meaning. By the time traffic gets to the level of routing it has been turned from a name into a number. Any system that claims to do this is just dereferencing domain names to their IP components.

Related Topic