>Hi, >On Sat, Sep 02, 2023 at 11:44:08AM +0000, Jason Long via Openvpn-users wrote: > I connected to the server, but default gateway not set: > > Unknown adapter OpenVPN TAP-Windows6: > > Connection-specific DNS Suffix . : > Link-local IPv6 Address . . . . . : fe80::b404:5a8b:df0e:52c3%15 > IPv4 Address. . . . . . . . . . . : 10.8.0.6 > Subnet Mask . . . . . . . . . . . : 255.255.255.252 > Default Gateway . . . . . . . . . : > > Why?
>"redirect-gateway def1" will not set "a default route" but "2 half >default routes". >So you'll never see them in "default gateway", but in "route print" >(OTOH, in your setup without any default gateway beforehand, it might >not work without the "local" or "autolocal" flags to redirect-gateway - >which I already wrote some weeks ago) >gert >-- >"If was one thing all people took for granted, was conviction that if you >feed honest figures into a computer, honest figures come out. Never doubted >it myself till I met a computer with a sense of humor." > Robert A. Heinlein, The Moon is a Harsh Mistress >Gert Doering - Munich, Germany g...@greenie.muc.de Hi, Thank you so much for your reply. I set the Windows OS network configuration manually: https://pasteboard.co/jXn3NHjHxTR7.png And as you can see, I never set the DNS server IP addresses and because of it, I can't ping the targets with their names. I used the Linux box IP address as the Windows default gateway. I added the following lines to my Server.conf: push "route 10.0.2.0 255.255.255.0 10.0.2.2 1" push "dhcp-option DNS 172.20.1.2" push "dhcp-option DNS 172.20.1.7" push "redirect-gateway autolocal" Added the following line to Client.ovpn: route 10.0.2.0 255.255.255.0 10.0.2.2 I connected to the OpenVPN server and "TAP-Windows Adapter" is as the below: https://pasteboard.co/15EbmDTzN8xS.png As you see, the DNS server IP addresses added to the TAP-Windows Adapter, but I can't ping the targets with their names: C:\> ping google.com Ping request could not find host google.com. Please check the name and try again. C:\> The routing table is: C:\> route print 4 =========================================================================== Interface List 15...00 ff 6a 2b f0 fa ......TAP-Windows Adapter V9 14...........................Wintun Userspace Tunnel 11...08 00 27 43 77 e3 ......Intel(R) PRO/1000 MT Desktop Adapter 1...........................Software Loopback Interface 1 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter 13...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: None Persistent Routes: None IPv6 Route Table =========================================================================== Active Routes: None Persistent Routes: None When the OpenVPN virtual NIC has the DNS server IP addresses, then why I can't ping the target with their names? _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users