-
Notifications
You must be signed in to change notification settings - Fork 1
/
windows-bride-maker.bat
55 lines (34 loc) · 1.34 KB
/
windows-bride-maker.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
::Script to assign LAN and Radmin VPN IPs + GW + DNS to the bridge.
::If you need to change IPs, just change them in variables (in the set section)
::Disable unneeded output
@echo off
::Set section
::Interface name. By default the name is "Network Bridge".
set INTERFACE_NAME=Network Bridge
::Change IPs if desired.
::LAN IP
set LAN_IP_ADDRESS=192.168.1.2
set LAN_SUBNET_MASK=255.255.255.0
::Radmin IP
set RV_IP_ADDRESS=26.0.0.3
set RV_SUBNET_MASK=255.0.0.0
::Default gateway IP
set DEFAULT_GATEWAY=192.168.1.1
::DNS servers. OpenDNS and local router.
set DNS_ADRESS1=208.67.220.220
set DNS_ADRESS2=192.168.1.1
::End of set section
::Start of assigning section
::Add local IP to the bridge.
netsh interface ipv4 add address "%INTERFACE_NAME%" %LAN_IP_ADDRESS% %LAN_SUBNET_MASK%
::Add Radmin VPN IP to the bridge.
netsh interface ipv4 add address "%INTERFACE_NAME%" %RV_IP_ADDRESS% %RV_SUBNET_MASK%
::Add default gateway to the bridge.
netsh interface ipv4 add route 0.0.0.0/0 "%INTERFACE_NAME%" %DEFAULT_GATEWAY%
::Add DNS server#1. OpenDNS in such case.
netsh interface ipv4 add dnsservers "Network Bridge" address=%DNS_ADRESS1%
::Add DNS server#2. Local router in such case.
netsh interface ipv4 add dnsservers "Network Bridge" address=%DNS_ADRESS2%
::End of assigning section
::Press any key to continue.
pause