rodley
03-05-2018, 01:30
Есть сеть, со шлюзом 192.168.0.1
В сети есть сервер, на котором стоит OpenVPN, адрес сервера 192.168.0.8
Вот его ipconfig /all:
Windows IP Configuration
Host Name . . . . . . . . . . . . : SRV-DEV-1C
Primary Dns Suffix . . . . . . . : dev.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dev.local
Ethernet adapter vpn:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Windows Adapter V9
Physical Address. . . . . . . . . : 00-FF-FD-00-94-32
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::1c7b:aae9:b970:9177%17(Preferred)
IPv4 Address. . . . . . . . . . . : 10.222.238.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, May 3, 2018 1:34:40 AM
Lease Expires . . . . . . . . . . : Friday, May 3, 2019 1:34:41 AM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 10.222.238.0
DHCPv6 IAID . . . . . . . . . . . : 536936445
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-6C-4A-5E-00-15-5D-00-03-00
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #3
Physical Address. . . . . . . . . : 00-15-5D-00-03-03
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::c560:5e4:b72c:e05f%15(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.188.18(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 251663709
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-6C-4A-5E-00-15-5D-00-03-00
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-00-03-04
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
Physical Address. . . . . . . . . : 00-15-5D-00-03-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.8(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.2
192.168.1.10
NetBIOS over Tcpip. . . . . . . . : Enabled
Вот с него route print:
===========================================================================
Interface List
17...00 ff fd 00 94 32 ......TAP-Windows Adapter V9
15...00 15 5d 00 03 03 ......Microsoft Hyper-V Network Adapter #3
14...00 15 5d 00 03 04 ......Microsoft Hyper-V Network Adapter #2
12...00 15 5d 00 03 00 ......Microsoft Hyper-V Network Adapter
1...........................Software Loopback Interface 1
13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.8 15
10.222.238.0 255.255.255.0 On-link 10.222.238.1 25
10.222.238.1 255.255.255.255 On-link 10.222.238.1 276
10.222.238.255 255.255.255.255 On-link 10.222.238.1 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.8 261
192.168.0.8 255.255.255.255 On-link 192.168.0.8 261
192.168.0.255 255.255.255.255 On-link 192.168.0.8 261
192.168.188.0 255.255.255.0 On-link 192.168.188.18 261
192.168.188.18 255.255.255.255 On-link 192.168.188.18 261
192.168.188.255 255.255.255.255 On-link 192.168.188.18 261
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.222.238.1 276
224.0.0.0 240.0.0.0 On-link 192.168.0.8 261
224.0.0.0 240.0.0.0 On-link 192.168.188.18 261
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.222.238.1 276
255.255.255.255 255.255.255.255 On-link 192.168.0.8 261
255.255.255.255 255.255.255.255 On-link 192.168.188.18 261
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.222.238.0 255.255.255.0 10.222.238.1 5
0.0.0.0 0.0.0.0 192.168.0.1 10
===========================================================================
Клиент подключается к серверу, получает с него IP 10.222.238.x, и дальше я могу пинговать и заходить на сервер как по 192.168.0.8, так и по 10.222.238.1
Но дальше ничего не пингуется, ни 192.168.0.1, ни другие компьютеры в этой подсети.
Вот конфиг сервера OpenVPN
port 1194
proto udp4
dev tap
dev-node vpn
ca ca.crt
cert srv-dev-1c.ho.alifco.ae.crt
key srv-dev-1c.ho.alifco.ae.key # This file should be kept secret
dh dh4096.pem
topology subnet
server 10.222.238.0 255.255.255.0
push "route 192.168.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
duplicate-cn
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
В сети есть сервер, на котором стоит OpenVPN, адрес сервера 192.168.0.8
Вот его ipconfig /all:
Windows IP Configuration
Host Name . . . . . . . . . . . . : SRV-DEV-1C
Primary Dns Suffix . . . . . . . : dev.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dev.local
Ethernet adapter vpn:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Windows Adapter V9
Physical Address. . . . . . . . . : 00-FF-FD-00-94-32
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::1c7b:aae9:b970:9177%17(Preferred)
IPv4 Address. . . . . . . . . . . : 10.222.238.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, May 3, 2018 1:34:40 AM
Lease Expires . . . . . . . . . . : Friday, May 3, 2019 1:34:41 AM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 10.222.238.0
DHCPv6 IAID . . . . . . . . . . . : 536936445
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-6C-4A-5E-00-15-5D-00-03-00
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #3
Physical Address. . . . . . . . . : 00-15-5D-00-03-03
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::c560:5e4:b72c:e05f%15(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.188.18(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 251663709
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-6C-4A-5E-00-15-5D-00-03-00
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-00-03-04
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
Physical Address. . . . . . . . . : 00-15-5D-00-03-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.8(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.2
192.168.1.10
NetBIOS over Tcpip. . . . . . . . : Enabled
Вот с него route print:
===========================================================================
Interface List
17...00 ff fd 00 94 32 ......TAP-Windows Adapter V9
15...00 15 5d 00 03 03 ......Microsoft Hyper-V Network Adapter #3
14...00 15 5d 00 03 04 ......Microsoft Hyper-V Network Adapter #2
12...00 15 5d 00 03 00 ......Microsoft Hyper-V Network Adapter
1...........................Software Loopback Interface 1
13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.8 15
10.222.238.0 255.255.255.0 On-link 10.222.238.1 25
10.222.238.1 255.255.255.255 On-link 10.222.238.1 276
10.222.238.255 255.255.255.255 On-link 10.222.238.1 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.8 261
192.168.0.8 255.255.255.255 On-link 192.168.0.8 261
192.168.0.255 255.255.255.255 On-link 192.168.0.8 261
192.168.188.0 255.255.255.0 On-link 192.168.188.18 261
192.168.188.18 255.255.255.255 On-link 192.168.188.18 261
192.168.188.255 255.255.255.255 On-link 192.168.188.18 261
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.222.238.1 276
224.0.0.0 240.0.0.0 On-link 192.168.0.8 261
224.0.0.0 240.0.0.0 On-link 192.168.188.18 261
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.222.238.1 276
255.255.255.255 255.255.255.255 On-link 192.168.0.8 261
255.255.255.255 255.255.255.255 On-link 192.168.188.18 261
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.222.238.0 255.255.255.0 10.222.238.1 5
0.0.0.0 0.0.0.0 192.168.0.1 10
===========================================================================
Клиент подключается к серверу, получает с него IP 10.222.238.x, и дальше я могу пинговать и заходить на сервер как по 192.168.0.8, так и по 10.222.238.1
Но дальше ничего не пингуется, ни 192.168.0.1, ни другие компьютеры в этой подсети.
Вот конфиг сервера OpenVPN
port 1194
proto udp4
dev tap
dev-node vpn
ca ca.crt
cert srv-dev-1c.ho.alifco.ae.crt
key srv-dev-1c.ho.alifco.ae.key # This file should be kept secret
dh dh4096.pem
topology subnet
server 10.222.238.0 255.255.255.0
push "route 192.168.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
duplicate-cn
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1