Unable to ping hostname TUN

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 12:37 pm

Hi,
The problem that I have is that I'm not able to see hostnames but i'm able to ping hosts from 10.5 network using openvpn

Code: Select all

config openvpn 'myvpn'
        option enabled '1'
        option verb '3'
        option port '1194'
        option proto 'udp'
        option dev 'tun'
        option server '10.8.0.0 255.255.255.0'
        option keepalive '10 120'
        option ca '/etc/openvpn/ca.crt'
        option cert '/etc/openvpn/my-server.crt'
        option key '/etc/openvpn/my-server.key'
        option dh '/etc/openvpn/dh2048.pem'
        list push 'route 10.5.0.0 255.255.255.0'
        list push 'dhcp-option DNS 10.5.0.1'
        list push 'dhcp-option DOMAIN lan'
I have tried to add

Code: Select all

      list push 'dhcp-option DNS 10.5.0.1'
        list push 'dhcp-option DOMAIN lan'
but without any good result
It resolves on my router:

Code: Select all

nslookup android-87de8db6e4276d5c 10.5.0.1
Server:         10.5.0.1
Address:        10.5.0.1#53

Name:   android-87de8db6e4276d5c
Address: 10.5.0.128
but not on my windows PC:

Code: Select all

nslookup android-87de8db6e4276d5c 10.5.0.1
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  10.5.0.1

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out
Tried disabling firewall same results.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Unable to ping hostname TUN

Post by TinCanTech » Thu Jun 01, 2017 12:57 pm

What type of DNS service are you using ?

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 12:59 pm

I'm not sure default lede dns I haven't configured it at all.
ps | grep dns
1534 dnsmasq 1076 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg02411c

that's all what it says in ps

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Unable to ping hostname TUN

Post by TinCanTech » Thu Jun 01, 2017 1:02 pm

To resolve host names you must have some kind of DNS server.

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 1:06 pm

Yeah it's Dnsmasq

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 1:16 pm

When I connect to network directly it works:

Code: Select all

nslookup android-87de8db6e4276d5c.lan 10.5.0.1
Server:  LEDE.lan
Address:  10.5.0.1

Name:    android-87de8db6e4276d5c.lan
Address:  10.5.0.128

Unfortunetly using OpenVPN it stops working.

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 2:07 pm

I fixed it by :
In /etc/config/dhcp, I needed to append the line:
option localservice '0'

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Thu Jun 01, 2017 2:15 pm

The only thing that now doesn't work is :

Code: Select all

nslookup lede.lan 10.5.0.1
Server:  LEDE.lan
Address:  10.5.0.1

Name:    lede.lan
Address:  10.5.0.1

Code: Select all

nslookup lede 10.5.0.1
Server:  LEDE.lan
Address:  10.5.0.1

*** LEDE.lan can't find lede: Non-existent domain
on direct network both work fine.

Pietia
OpenVpn Newbie
Posts: 9
Joined: Tue May 30, 2017 9:40 am

Re: Unable to ping hostname TUN

Post by Pietia » Fri Jun 02, 2017 7:56 am

Also I tested using windows 10 it works perfectly fine there ,using VPN client in windows 7 the result are like above.

Post Reply