Name does not resolve

Hi,

Why does the connection not work even if I am already connect to the OpenWrt machine via a terminal session?

root@OpenWrt:/etc/openvpn# scp client.ovpn aaron@aaron-HP-ProBook-4420s:/home/aaron/client.ovpn

/usr/bin/dbclient: Connection to aaron@aaron-HP-ProBook-4420s:22 exited: Connect failed: Error resolving 'aaron-HP-ProBook-4420s' port '22'. Name does not resolve

lost connection

root@OpenWrt:/etc/openvpn# scp client.ovpn aaron@aaron-HP-ProBook-4420s:/home/aaron/client.ovpn

Thanks,

Aaron

Did you set a dns record for this host?
Did you make any modifications to the way dnsmasq is configured?

1 Like

I have made it so OpenWRT gets the dns from the main router.

assuming this configuration is correct, it's then an issue with your main router.

I will check in resolv.conf and see what is in there. Have a feeling it is corrupt again although, not how to permanently can it?

This is the contents of "/tmp/resolv.conf.d/resolv.conf.auto " but it for some reason does not get copied across to /etc/resolv.conf.

# Interface lan
nameserver 10.1.1.1
# Interface wwan
nameserver 10.1.1.1

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/dhcp

That's fine, dnsmasq uses both by default, unless you've disabled it in the settings.

I assume 10.1.1.1 is the IP of your main router ?

1 Like

Yes, 10.1.1.1 is the address of the main router.

and if you nslookup aaron-HP-ProBook-4420, where does the query go ?

1 Like
root@OpenWrt:~#  nslookup aaron-HP-ProBook-4420
Server:		127.0.0.1
Address:	127.0.0.1:53

** server can't find aaron-HP-ProBook-4420: NXDOMAIN

** server can't find aaron-HP-ProBook-4420: NXDOMAIN

@psherman

network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd70:bc3e:9edc::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'
        option gateway '10.1.1.2'
        option dns '10.1.1.1'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'wwan'
        option proto 'static'
        option device 'wlan0'
        option ipaddr '10.1.1.2'
        option netmask '255.255.255.0'
        option gateway '10.1.1.1'
        option dns  '10.1.1.1'

config interface 'rebr'
        option proto 'relay'
        option ipaddr '10.1.1.2'
        list network 'lan'
        list network 'wwan'

dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        list server '10.1.1.1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ignore '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

does this screenshot match your config ?

image

That is what is displayed in Luci.

Wait s second... How does your client gets an IP address? In your DHCP config the lan interface is disabled. If dnsmasq does not assign an address to the client it can not know it's name and therefore can not resolve that name.
Edit: who holds the 10.1.1.1 address? It's not assigned to the Openwrt router ...

The main router is ip address is 10.1.1.1 openwrt wlan is 10.1.1.2

Ah I missed that you use relay-interface...

But/And how is the main routers (10.1.1.1) DHCP/DNS configured?

Technicolor TG789vac v2

That is the user manual for my main router. Not sure how it gets the dhcp/dns since I just use the setup wizard. However, if I had to guess by default it would be dynamically set.