What's new

Openvpn - device name resolution over tun?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

unknownsoldierx

New Around Here
I've set up my first VPN, using openvpn, between my Windows PC and my Android phone. I can't get name resolution to work, so I have to connect to SMB and devices using IPs.

After a bit of reading, it seemed all I needed to do was have the server push "dhcp-option WINS" for each device on my LAN. That isn't working for me.

Server is hosted on Windows 7

LAN is 192.168.11.0
VPN is 192.168.2.0

server
Code:
port 1194
proto tcp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh4096.pem"
server 192.168.2.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.11.0 255.255.255.0"
route 0.0.0.0 0.0.0.0 vpn_gateway 50
push "dhcp-option WINS 192.168.11.100"
push "dhcp-option WINS 192.168.11.101"
push "dhcp-option WINS 192.168.11.103"
keepalive 10 120
tls-auth "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ta.key"
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3

client
Code:
client
dev tun
proto tcp
remote mydyndnsprovider.com xxxx
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
verb 3
 
Last edited:
I've set up my first VPN, using openvpn, between my Windows PC and my Android phone. I can't get name resolution to work, so I have to connect to SMB and devices using IPs.

After a bit of reading, it seemed all I needed to do was have the server push "dhcp-option WINS" for each device on my LAN. That isn't working for me.

I have not studied it in detail, but there seems to be a similar discussion with a possible solution here:
https://www.snbforums.com/threads/lack-of-name-resolution-when-using-openvpn-server.44280/

I have not tested the solution proposed, just wanted to draw your attention to the thread.[/QUOTE]
 
That looks promising, but I'm not sure to apply a lot of that since my openvpn server is running on Windows, not a router. I'm assuming I don't need a WINS server, and I don't know how to set a custom domain for the vpn.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top