3

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?

2 Answers 2

3

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.

2
  • 1
    That sucks... :). Any pointers on what to look next? Jan 25, 2011 at 21:18
  • @rmarimon Pretty much what you already know. Set up static routes to the debian subnets you want tunneled.
    – sysadmin1138
    Jan 25, 2011 at 21:32
1

What kind of traffic are you routing?

If it's HTTP, you could configure vhosts and proxy *.debian.org to IP addresses or domain names that resolve to IP's on the tun0 subnet. You can use modproxy or modrewrite for this. If your routes are setup correctly and it's just HTTP traffic, this should work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .