Всем привет.
Сервер на CentOS 7. Клиент OpenVPN GUI на Windows 10.
Конфиг OVPN
client
proto udp
remote xx.xx.254.75 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_QL2ifJug00NMFWU7 name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
<ca>
route print до подключения:
IPv4 таблица маршрута
===========================================================================
Активные маршруты:
Сетевой адрес Маска сети Адрес шлюза Интерфейс Метрика
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.101 35
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.101 291
192.168.0.101 255.255.255.255 On-link 192.168.0.101 291
192.168.0.255 255.255.255.255 On-link 192.168.0.101 291
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.0.101 291
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.0.101 291
route print после подключения:
IPv4 таблица маршрута
===========================================================================
Активные маршруты:
Сетевой адрес Маска сети Адрес шлюза Интерфейс Метрика
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.101 35
0.0.0.0 128.0.0.0 10.8.0.1 10.8.0.2 259
10.8.0.0 255.255.255.0 On-link 10.8.0.2 259
10.8.0.2 255.255.255.255 On-link 10.8.0.2 259
10.8.0.255 255.255.255.255 On-link 10.8.0.2 259
xx.xx.254.75 255.255.255.255 192.168.0.1 192.168.0.101 291
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
128.0.0.0 128.0.0.0 10.8.0.1 10.8.0.2 259
192.168.0.0 255.255.255.0 On-link 192.168.0.101 291
192.168.0.101 255.255.255.255 On-link 192.168.0.101 291
192.168.0.255 255.255.255.255 On-link 192.168.0.101 291
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.0.101 291
224.0.0.0 240.0.0.0 On-link 10.8.0.2 259
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.0.101 291
255.255.255.255 255.255.255.255 On-link 10.8.0.2 259
Логи в клиенте
Sat Nov 09 21:28:02 2019 OpenVPN 2.4.8 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 31 2019
Sat Nov 09 21:28:02 2019 Windows version 6.2 (Windows 8 or greater) 64bit
Sat Nov 09 21:28:02 2019 library versions: OpenSSL 1.1.0l 10 Sep 2019, LZO 2.10
Enter Management Password:
Sat Nov 09 21:28:02 2019 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Sat Nov 09 21:28:02 2019 Need hold release from management interface, waiting...
Sat Nov 09 21:28:02 2019 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'state on'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'log all on'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'echo all on'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'bytecount 5'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'hold off'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'hold release'
Sat Nov 09 21:28:02 2019 MANAGEMENT: CMD 'password [...]'
Sat Nov 09 21:28:02 2019 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat Nov 09 21:28:02 2019 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Nov 09 21:28:02 2019 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat Nov 09 21:28:02 2019 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Nov 09 21:28:02 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]xx.xx.254.75:1194
Sat Nov 09 21:28:02 2019 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sat Nov 09 21:28:02 2019 UDP link local: (not bound)
Sat Nov 09 21:28:02 2019 UDP link remote: [AF_INET]xx.xx.254.75:1194
Sat Nov 09 21:28:02 2019 MANAGEMENT: >STATE:1573298882,WAIT,,,,,,
Sat Nov 09 21:28:02 2019 MANAGEMENT: >STATE:1573298882,AUTH,,,,,,
Sat Nov 09 21:28:02 2019 TLS: Initial packet from [AF_INET]xx.xx.254.75:1194, sid=fb1a26a5 588b13a3
Sat Nov 09 21:28:03 2019 VERIFY OK: depth=1, CN=cn_AVomgxZ5r6500GxZ
Sat Nov 09 21:28:03 2019 VERIFY KU OK
Sat Nov 09 21:28:03 2019 Validating certificate extended key usage
Sat Nov 09 21:28:03 2019 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Nov 09 21:28:03 2019 VERIFY EKU OK
Sat Nov 09 21:28:03 2019 VERIFY X509NAME OK: CN=server_QL2ifJug00NMFWU7
Sat Nov 09 21:28:03 2019 VERIFY OK: depth=0, CN=server_QL2ifJug00NMFWU7
Sat Nov 09 21:28:03 2019 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256, 256 bit EC, curve: prime256v1
Sat Nov 09 21:28:03 2019 [server_QL2ifJug00NMFWU7] Peer Connection Initiated with [AF_INET]xx.xx.254.75:1194
Sat Nov 09 21:28:04 2019 MANAGEMENT: >STATE:1573298884,GET_CONFIG,,,,,,
Sat Nov 09 21:28:04 2019 SENT CONTROL [server_QL2ifJug00NMFWU7]: 'PUSH_REQUEST' (status=1)
Sat Nov 09 21:28:04 2019 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 213.133.98.98,dhcp-option DNS 213.133.99.99,dhcp-option DNS 213.133.100.100,redirect-gateway def1 bypass-dhcp,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0,peer-id 0,cipher AES-128-GCM'
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: timers and/or timeouts modified
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: --ifconfig/up options modified
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: route options modified
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: route-related options modified
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: peer-id set
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: adjusting link_mtu to 1624
Sat Nov 09 21:28:04 2019 OPTIONS IMPORT: data channel crypto options modified
Sat Nov 09 21:28:04 2019 Outgoing Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Sat Nov 09 21:28:04 2019 Incoming Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Sat Nov 09 21:28:04 2019 interactive service msg_channel=816
Sat Nov 09 21:28:04 2019 ROUTE_GATEWAY 192.168.0.1/255.255.255.0 I=10 HWADDR=00:1c:c0:fa:56:0f
Sat Nov 09 21:28:04 2019 open_tun
Sat Nov 09 21:28:04 2019 TAP-WIN32 device [Подключение по локальной сети] opened: \\.\Global\{FF0FBC65-6A22-4BDC-89AC-570CD81F5DD1}.tap
Sat Nov 09 21:28:04 2019 TAP-Windows Driver Version 9.24
Sat Nov 09 21:28:04 2019 Set TAP-Windows TUN subnet mode network/local/netmask = 10.8.0.0/10.8.0.2/255.255.255.0 [SUCCEEDED]
Sat Nov 09 21:28:04 2019 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.2/255.255.255.0 on interface {FF0FBC65-6A22-4BDC-89AC-570CD81F5DD1} [DHCP-serv: 10.8.0.254, lease-time: 31536000]
Sat Nov 09 21:28:04 2019 Successful ARP Flush on interface [7] {FF0FBC65-6A22-4BDC-89AC-570CD81F5DD1}
Sat Nov 09 21:28:04 2019 MANAGEMENT: >STATE:1573298884,ASSIGN_IP,,10.8.0.2,,,,
Sat Nov 09 21:28:04 2019 Blocking outside dns using service succeeded.
Sat Nov 09 21:28:10 2019 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
Sat Nov 09 21:28:10 2019 C:\Windows\system32\route.exe ADD xx.xx.254.75 MASK 255.255.255.255 192.168.0.1
Sat Nov 09 21:28:10 2019 Route addition via service succeeded
Sat Nov 09 21:28:10 2019 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.1
Sat Nov 09 21:28:10 2019 Route addition via service succeeded
Sat Nov 09 21:28:10 2019 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.1
Sat Nov 09 21:28:10 2019 Route addition via service succeeded
Sat Nov 09 21:28:10 2019 Initialization Sequence Completed
Sat Nov 09 21:28:10 2019 MANAGEMENT: >STATE:1573298890,CONNECTED,SUCCESS,10.8.0.2,xx.xx.254.75,1194,,
Мне интернет через сервер к которому подключаюсь, не нужен. Мне нужен интернет через мой шлюз 192.168.0.1. Как я понял, клиент добавляет маршруты сервера, поэтому интернета нет.
Значит надо отредактировать какой-то файл, чтобы он не добавлял свои маршруты. Но не могу найти этот файл (