Created
April 3, 2012 17:33
-
-
Save ya-pulser/2293927 to your computer and use it in GitHub Desktop.
Set of cmd/bat files to turn routing under Windows 7 from one network card to other
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
route delete 0.0.0.0 | |
set INTERFACE=11 | |
set ROUTER=192.168.12.1 | |
route add 0.0.0.0 MASK 0.0.0.0 %ROUTER% IF %INTERFACE% | |
netsh interface ip set dns %INTERFACE% static %ROUTER% register=primary validate=no | |
netsh interface ip add dns %INTERFACE% 212.48.193.36 index=2 no | |
netsh interface ip add dns %INTERFACE% 8.8.8.8 index=3 no | |
netsh interface ip add dns %INTERFACE% 8.8.4.4 index=4 no | |
route print 0.*.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
route delete 0.0.0.0 | |
set INTERFACE=12 | |
set ROUTER=192.168.1.1 | |
route add 0.0.0.0 MASK 0.0.0.0 %ROUTER% IF %INTERFACE% | |
route add 192.168.100.0 MASK 255.255.255.0 %ROUTER% IF %INTERFACE% | |
netsh interface ip set dns %INTERFACE% static %ROUTER% validate=no | |
netsh interface ip add dns %INTERFACE% 87.237.112.10 index=2 no | |
netsh interface ip add dns %INTERFACE% 8.8.8.8 index=3 no | |
netsh interface ip add dns %INTERFACE% 8.8.4.4 index=4 no | |
route print 0.*.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
route delete 0.0.0.0 | |
route add 0.0.0.0 MASK 0.0.0.0 192.168.12.1 IF 11 | |
route add 0.0.0.0 MASK 0.0.0.0 192.168.1.1 IF 12 | |
netsh interface ip set dns 11 dhcp validate=no | |
netsh interface ip set dns 12 dhcp validate=no | |
route print 0.*.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment