Question

Can I write a Windows Task or some kind of configuration script that will choose between two Local Area Connections according to the website I am visiting?

It may not be the best answer to my problem, but if it is possible, at least I know it will work.

The issue in full:

My main ISP currently has an issue routing me to my own websites (all hosted on the same server). It also has a 'sticky IP address' (note, not static) - it will only change your IP address once a fortnight, and they can't (won't) even force a change. Their second line support are working on the issue, but so far, no good, and I cannot access my own websites via their internet connection.

So, currently, I am switching from my main network to my mobile 3G network (tethered) any time I want to work on or view my own websites.

I would like to write a script that will make Windows automatically choose my mobile network for FTP, email and browsing my own websites, but use my main ISP for all other online activity.

Haven't a clue where to start - any help appreciated! Thanks,

Sarah

Was it helpful?

Solution

Well, that was simple, no scripting required. If you're using IPv4 (you can check here https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDoQFjAB&url=http%3A%2F%2Fwww.amiusingipv6.com%2F&ei=Bq4_UpakM4vv0gXboIDwCQ&usg=AFQjCNHiUnyKvVcUe8Z966YwoycLI28urw&bvm=bv.52434380,d.d2k)

  1. Turn Windows features on or off.
  2. Turn on RIP Listener.
  3. Disable your internet connection that cannot connect to the website you are trying to access, and 'tracert' to the website: make a note of the IP address of the website, and the first IP address in the hop list ([FIRST IP]).
  4. Type in 'route print' and make a note of the Interface number of your secondary internet connection.
  5. Type in 'route add -p [WEBSITE IP ADDRESS] mask 255.255.0.0 [FIRST IP] IF [INTERFACE NUMBER] metric 1'
  6. Reboot.

All traffic to the website IP address (be it mail, FTP, whatever) will go through the secondary connection, all other traffic goes through the main connection.

IPv6 instructions here: http://windows.microsoft.com/en-gb/windows7/configuring-multiple-gateways-on-a-network

My setup is just an iPhone connected via USB as secondary connection and a Home Hub connected via ethernet as primary.

Hope this is useful to someone else - but of course, no one should ever think of using this to get around IP blocks on message boards...

Sarah

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top