Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Duplicate wifi connection but with different gateway

15 Oct 2011   #11
trucmuche2005

Windows 7 SP1 Ultimate 64 bits
 
 

I didn't tried basic shortcuts because I saw that the TCP-IP modifications alter ALL the network interfaces. This is precisely why I'm asking the question here...

Creating two hardware profiles is not a solution because I don't want to reboot each time I start & stop the correct gateway under windows...


My System SpecsSystem Spec
.
15 Oct 2011   #12
aem

Windows 7 Ultimate 64Bit
 
 

Quote   Quote: Originally Posted by trucmuche2005 View Post
I didn't tried basic shortcuts because I saw that the TCP-IP modifications alter ALL the network interfaces. This is precisely why I'm asking the question here...
Then you have the answer you are looking for. No can do what you wanted done.
My System SpecsSystem Spec
15 Oct 2011   #13
Corazon

Windows 7 Professional SP1 32-bit
 
 

As aem said, what you want really can't be done.

I have to wonder why you're trying to do this - allowing your Linux system to have an Internet connection but preventing Windows from having one. Doesn't make much sense to me, I sense some paranoia here. Why is it so important for you to keep Windows away from the 'net?
My System SpecsSystem Spec
.

15 Oct 2011   #14
lhorwinkle

Win 7
 
 

OK, simple.

Create a script that uses the "route" command. (I usually write shell scripts using Cygwin, a Unix-like environment that runs on Windows. Much more powerful than DOS-type scripting.)

Start by running "route print". That produces a listing of your existing route table ... including the Internet-accessible gateway information. Save that and turn it into a script (as a series of "route" commands). Whenever you run that script, it will produce the desired routing, with internet access.

Make a copy of the script, and change the copy: Leave the "local" network routes alone, but change any address range that points to the proper internet gateway so that it instead points to a bogus address in your subnet. Whenever you run that script, internet access will not be available.

Create a shortcut for the first script, and call it "Internet", or similar.
Create a shortcut for the second script, and call it "No Internet".
My System SpecsSystem Spec
15 Oct 2011   #15
trucmuche2005

Windows 7 SP1 Ultimate 64 bits
 
 

Thank you all for your interest in my question !

@ Corazon : You're wondering why I want to do this. Why people can't usually admit that, sometimes, the man who asks a question has a good reason to ask it ? I explained my technical reason but I don't want to explain my entire life to discuss whether or not something can technically be done in window. Should I ? You talk about "paranoia". This is not the case BUT even if it was, why does it matter for you ? I WANT to do this, what kind of authority you got about me to discuss the reason ? You think that there is no reason to keep windows off internet ? I got one and I don't have to share it with you... I'm looking for a solution, not for a psychanalist, I don't need that...

@ lhorwinkle : THANK YOU !! I should have think about this solution myself !! Thank you very very much ! So easy... :-)

I'll test it and if ok, mark this question as solved ;-)

Thank you all !
My System SpecsSystem Spec
15 Oct 2011   #16
lhorwinkle

Win 7
 
 

Run "route print" ...

MY FIRST COMPUTER, WIN XP: Its IP is 192.168.1.65
Code:
ignore--> INTERFACE LIST
ignore--> 0x1 ........................... MS TCP Loopback interface
ignore--> 0x2 ...00 1b 38 80 af 54 ...... Intel 82566MM Gigabit Network Connection
ignore--> 0x3 ...00 ff d0 c2 8d 88 ...... Juniper Network Connect Virtual Adapter

                   ACTIVE ROUTES:
                   NETWORK DESTINATION       NETMASK         GATEWAY     INTERFACE    METRIC
CHANGE THIS       -->         0.0.0.0          0.0.0.0   192.168.1.254  192.168.1.65     20
loopback          -->       127.0.0.0        255.0.0.0       127.0.0.1     127.0.0.1      1
local LAN address -->     192.168.1.0    255.255.255.0    192.168.1.65  192.168.1.65     20
local LAN address -->    192.168.1.65  255.255.255.255       127.0.0.1     127.0.0.1     20
local LAN address -->   192.168.1.255  255.255.255.255    192.168.1.65  192.168.1.65     20
special           -->       224.0.0.0        240.0.0.0    192.168.1.65  192.168.1.65     20
special           --> 255.255.255.255  255.255.255.255    192.168.1.65  192.168.1.65      1
my router         --> DEFAULT GATEWAY:   192.168.1.254
MY SECOND COMPUTER, WIN 7: Its IP is 192.168.1.65
This computer is 192.168.1.64
Code:
ignore--> INTERFACE LIST
ignore-->  11...70 71 bc b8 9d 7f ......Intel 82567V-2 Gigabit Network Connection
ignore-->   1...........................Software Loopback Interface 1
ignore-->  12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
ignore-->  10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter

                   ACTIVE ROUTES:
                   NETWORK DESTINATION       NETMASK         GATEWAY     INTERFACE    METRIC
CHANGE THIS       -->         0.0.0.0          0.0.0.0   192.168.1.254  192.168.1.64     20
loopback          -->       127.0.0.0        255.0.0.0       On-link       127.0.0.1    306
loopback          -->       127.0.0.1  255.255.255.255       On-link       127.0.0.1    306
loopback          --> 127.255.255.255  255.255.255.255       On-link       127.0.0.1    306
local LAN address -->     192.168.1.0    255.255.255.0       On-link    192.168.1.64    276
local LAN address -->    192.168.1.64  255.255.255.255       On-link    192.168.1.64    276
local LAN address -->   192.168.1.255  255.255.255.255       On-link    192.168.1.64    276
special           -->       224.0.0.0        240.0.0.0       On-link       127.0.0.1    306
special           -->       224.0.0.0        240.0.0.0       On-link    192.168.1.64    276
special           --> 255.255.255.255  255.255.255.255       On-link       127.0.0.1    306
special           --> 255.255.255.255  255.255.255.255       On-link    192.168.1.64    276
For both computers, look at the line I marked "CHANGE THIS".
As it stands, this maps my internet through my router (GATEWAY 192.168.1.254).
If I change the GATEWAY to, say, my loopback address 127.0.0.1, then internet traffic would be blocked.

For the script that allows internet access:
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 ROUTER metric 20

where ROUTER is the IP of your local internet router

For the script that denies internet access:
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 127.0.0.1 metric 20


Note: I do this sort of thing on that first computer (running Win XP). I've not tried it on the second computer (running Win 7).
My System SpecsSystem Spec
15 Oct 2011   #17
Corazon

Windows 7 Professional SP1 32-bit
 
 

Quote   Quote: Originally Posted by trucmuche2005 View Post
@ Corazon : You're wondering why I want to do this. Why people can't usually admit that, sometimes, the man who asks a question has a good reason to ask it ? I explained my technical reason but I don't want to explain my entire life to discuss whether or not something can technically be done in window. Should I ? You talk about "paranoia". This is not the case BUT even if it was, why does it matter for you ? I WANT to do this, what kind of authority you got about me to discuss the reason ? You think that there is no reason to keep windows off internet ? I got one and I don't have to share it with you... I'm looking for a solution, not for a psychanalist, I don't need that...
Sensitive much? I just wanted to understand your desire for keeping Windows out of the Internet, that's all. Trust me, I'm not interested in psychoanalyzing you :P
My System SpecsSystem Spec
15 Oct 2011   #18
aem

Windows 7 Ultimate 64Bit
 
 

Well i tested it and it it didn't work. What is the exact code do not put in Change this etc.
My System SpecsSystem Spec
15 Oct 2011   #19
lhorwinkle

Win 7
 
 

Quote   Quote: Originally Posted by aem View Post
Well i tested it and it it didn't work. What is the exact code do not put in Change this etc.
In my earlier post, look at the results from the "route print" command. There's only one route that needs to be changed for Internet vs. No Internet.

So, to enable internet, run these two commands (from a command prompt) ...
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 ROUTER metric 20

... be sure to replace ROUTER with the IP of your local internet router (DSL modem or cable modem). In the example, mine is 192.168.1.254, but yours might be different.

To disable internet ...
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 127.0.0.1 metric 20
My System SpecsSystem Spec
15 Oct 2011   #20
aem

Windows 7 Ultimate 64Bit
 
 

It disconnects the internet but when you Disconnect and Reconnect your wifi, it back to normal.
My System SpecsSystem Spec
Reply

 Duplicate wifi connection but with different gateway




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Default gateway not available - have new router and new wifi adapter
My internet keeps dropping out and when troubleshoot says 'default gateway not available' and fixes it. it drops out anywhere from every 1 minute to a few hours. must disable wifi adapter and then enable and all is fine. I was told to set a static ip which i did and had no effect. I thought...
Network & Sharing
Connection Dropping - Default Gateway not available
Hello, for quite some time now I have been experiencing constant drops in my wireless connection, as constant as every 1 minute. It is not often I stay connected for more then 15 minutes at a time. When I run troubleshoot the end report says varying messages, but mainly "Default Gateway not...
Network & Sharing
Cannot Connect to Gateway? (WIFI) Win 7-64bit
Hey guys, been having trouble with my desktop for awhile after my family and I moved. I was running off an ethernet connection at the time but now I'm using a linksys adapter through our wifi network, however anytime I boot up the computer I get the yellow no internet access symbol. After using...
Network & Sharing
Wireless Connection - WIFI connection not showing up
I have a iMac and I have installed Windows7 using Bootcamp v4.0. When I use the computer on MacOS X I am able to connect to the Wireless Connection named (ORACLE@PG), also when I restart the computer the same connection shows on the boot-loader screen. But when I am on the Windows 7, I am unable...
Network & Sharing
Default Gateway Not Available - Connection keeps dropping
Hello everyone, I'm hoping that you can help me. I've lurked this forum for a long time. This is a wired connection to the router/modem and I have also tried it on a different router. I'll give a short version, then the lengthy background and what I have tried. Short version: Any download of...
Network & Sharing
Default gateway not available, network connected BOTH wifi and LAN
Seems to be popping up alot, so maybe some one has an idea. I recently woke up to find that my Acer Aspire 5250 notebook with an Atheros network card, which had the previous evening had wifi connection, no longer could get online. Further investigation showed that the notebook was/is connecting...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:05.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App