0

I am running an OpenVPN server on a Windows 10 machine with following server configurations:

port 1194 proto tcp dev tun ****ca/cert/key/dh/tls-auth omitted**** server 10.8.1.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 10.1.1.0 255.255.255.0" push "dhcp-option DNS 10.1.1.1" duplicate-cn keepalive 10 120 cipher AES-128-CBC persist-key persist-tun status openvpn-status.log verb 3 

Say this machine as PC1 (10.1.1.2) and it is not the gateway for my LAN (10.1.1.0/24); there is a wireless router running as the gateway (10.1.1.1).

Remote client (another Windows 10 machine) can ping PC1 using the local IP address (10.1.1.2) but unable to ping using the hostname (e.g., mydesktop).

I can update client's Windows host file with the hostname, but if there are many clients this would not be very feasible.

I tried adding push "dhcp-option DOMAIN local" to sever.ovpn but it didn't help. I also tried adding a static DNS record to the router, but when client PING mydesktop, it gives this error: Ping request could not find host mydesktop. Please check the name and try again.

5
  • Not sure if it is relevant, but for Windows clients you can use block-outside-dns in the client conf to prevent DNS leak. Commented Oct 24, 2019 at 17:06
  • Since you are relying on DNS for this, have you made sure that the server can actually resolve it anyway? (With dig / nslookup /...) Commented Oct 24, 2019 at 17:08
  • @TomYan nslookup mydesktop get resolved in both server and client. But ping mydesktop returns the mentioned error message for the client. Commented Oct 24, 2019 at 18:33
  • Just try block-outside-dns on the clients then. I actually had similar problem: community.openvpn.net/openvpn/ticket/910 Commented Oct 24, 2019 at 19:27
  • @TomYan Unfortunately block-outside-dns did not help me with my case. :( Commented Oct 25, 2019 at 11:44

1 Answer 1

0

Use dev tap instead.  It was the solution for me.  I assume it is not possible with dev tun.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.