Sign in to follow this  
Followers 0
chown

Rerouting traffic with Windows XP

2 posts in this topic

So here's the problem: I want to route my traffic though bob, but both of our systems are XP and we're on the same network.

Gateway IP:  A.A.A.1/24
My IP: A.A.A.10/24
Bobs IP: A.A.A.11/24

Traffic from my IP is not routed onto the internet (except for traffic to TCP/21) and has to be sent via an HTTP proxy, so basically I want all my traffic to be transparently routed through Bob because traffic from his IP is sent straight on to the internet without second thought.

Both of our systems and the gateway are on the same subnet, and Bob and I only have 1 NIC each.

I only have Administrative shell access to Bobs system, so I've installed a SOCKS proxy but it's not enough since some applications don't allow you to specify a proxy (Steam), so I need something nice and low level like a static route to bounce traffic off Bob, or possibly a VPN.

So does anyone have any experience routing traffic on windows boxen?

0

Share this post


Link to post
Share on other sites

If anyone's interested, I've sorted it out:

You can enable routing in Windows by going into the registry (on Bobs computer) and setting this DWORD value to 1:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter

Then you can route your traffic though Bob by changing the default gateway in your network settings to Bobs IP. I also created an explicit route for traffic to the old gateway (A.A.A.1) to use Bob as a gateway as a bugfix since the old gateway kept reappearing on the routing tables.

route add A.A.A.1 mask 255.255.255.255 A.A.A.11 metric 1 -p

  • A.A.A.1 is the packet's destination IP
  • 255.255.255.255 is how much of the packet's destination IP must match for this route to apply (in this case all)
  • A.A.A.11 is the gateway to use for packets matching this route
  • 1 is the priority of this route, so if there was an identical route with a different gateway and a greater metric, this one would have priority because 1 is the lowest metric (1st priority)
  • -p means that this route is persistent, and that it will not be flushed when windows reboots.

You can also add the default gateway manually like this, but you shouldn't need to if you set the gateway in the network settings.

route add 0.0.0.0 mask 0.0.0.0 A.A.A.11 metric 10

The mask of 0.0.0.0 means that the destination IP doesn't have to match the destination specified (0.0.0.0) at all, and therefore can be anything.

For more advanced peeps, there's the netsh command which also allows you to configure routing protocols such as RIP and OSPF, and do many other things (like disabling the Windows firewall from the command line).

Edited by chown
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0