Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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, It almost looks like iptables for Windows?

share|improve this answer
That's what I was thinking, but with a mikrotik router like an RB750 and some mangle rules. – Matt Jun 10 '12 at 23:45

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 - 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.