I'm implementing a direct routing load balanced solution using Windows Server 2008 R2 as back-end server. I've configured a loopback interface with the external IP address. This works, I am receiving packets with the external IP address and respond to them appropriately. However our infrastructure requires that traffic which is being load-balanced should go through a different gateway then any other traffic originating from the server, ie. updates etc. So basicly I need to route packets based on source address (external IP) to another gateway. The built-in Windows 'route' command allows routing based on destination address only. I've tried setting a default gateway on the loopback interface and mangled with weak/strong host send/receive parameters on the interfaces, however this didn't work.
Is there any way around this, possibly using third party tools?
A somewhat kludgy solution to this would be to have a router/VM running like something DDWRT/OpenWRT in front of the Windows box to achieve the re-routing/mangling. Although, I haven't used this yet, this project also looks somehwat promising, http://wipfw.sourceforge.net/doc.html It almost looks like iptables for Windows?
Have you checked Windows Routing and Remote RAS I believe it was last called? It looks like in win 2008 it's under Network Policy and Access Services Role.
It had more routing capabilities than the route command - However this is a MUCH more advanced routing question than most people ask on Windows - Linux tends to be a little more "router" appliance friendly than Windows - That's been one of the main reason I keep up my Linux skills. Packet mangling is what you are trying to do, not change the interface / routes in windows.
We used to do this extensively to prioritize customer traffic (we sold bandwidth in tiers to larger customers, they'd split images from their main site using images.example.com) - It was quite easy on Linux to mark the packets and route differently if we were low on bandwidth - Haven't done that in many years since we have tons of bandwidth available.. but once we had the packets marked we could route any way we wanted - matching what you are asking.