Cannot resolve ipv4 for hosts in /etc/config/dhcp

I have a router with OpenWrt 23.05.3,
Lan ip:
IPv4: 192.168.91.1/24
IPv6: fd90:a1b0:9848::1/64

I am running Windows 11, a complete new pc (still with no changes to my network stack).
I have several domain in /etc/config/dhcp, that points to a ipv4 address, eg:

config domain
        option name 'nelson.fortunatus.dk'
        option ip '192.168.91.1'

The reason for this name is, that I access the name from the outside, where it points to my routers external ip where port forwarding is used to reach a server, but when I am on the inside, I want the ip to point directly to the server.

But windows refuses to resolve the ipv4 unless i explicit asks it to use ipv4. Former, I have disabled ipv6 on my windows pc, but I would rather like to change what is needed on the router, to make it work:

C:\Users\tbn>ping nelson.fortunatus.dk
Ping request could not find host nelson.fortunatus.dk. Please check the name and try again.

It looks like Windows is using ipv6 dns server, but resolves google.dk to both ipv6 and ipv4

C:\Users\tbn>nslookup
Default Server:  UnKnown
Address:  fde2:49ff:5bc4::1

> google.com
Server:  UnKnown
Address:  fde2:49ff:5bc4::1

Non-authoritative answer:
Name:    google.com
Addresses:  2a00:1450:4005:802::200e
          142.250.181.206

> ing.dk
Server:  UnKnown
Address:  fde2:49ff:5bc4::1

Non-authoritative answer:
Name:    ing.dk
Address:  34.102.188.132

> nelson.fortunatus.dk
Server:  UnKnown
Address:  fde2:49ff:5bc4::1

*** No internal type for both IPv4 and IPv6 Addresses (A+AAAA) records available for nelson.fortunatus.dk```


nslookup nelson.fortunatus.dk
Server:  UnKnown
Address:  fde2:49ff:5bc4::1

*** No internal type for both IPv4 and IPv6 Addresses (A+AAAA) records available for nelson.fortunatus.dk

When I specific use the ipv4 address of my router, nslookup works:

C:\Users\tbn>nslookup nelson.fortunatus.dk 192.168.91.1
Server:  wg.fortunatus.dk
Address:  192.168.91.1

Name:    nelson.fortunatus.dk
Address:  192.168.91.1

I have no idea about what fde2:49ff:5bc4::1 is, but is is propably form the dhcp-server:

C:\Users\tbn>ipconfig /all
Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Intel(R) Wi-Fi 6E AX211 160MHz
   Physical Address. . . . . . . . . : C8-15-4E-52-79-66
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : fd90:a1b0:9848:0:7dcb:8633:ddc5:a650(Preferred)
   IPv6 Address. . . . . . . . . . . : fde2:49ff:5bc4::399(Preferred)
   Lease Obtained. . . . . . . . . . : 27. juni 2024 20:51:44
   Lease Expires . . . . . . . . . . : 28. juni 2024 08:51:44
   IPv6 Address. . . . . . . . . . . : fde2:49ff:5bc4:0:c5a9:10ea:ef2e:72ad(Preferred)
   Temporary IPv6 Address. . . . . . : fd90:a1b0:9848:0:567:596b:42b4:ba5e(Preferred)
   Temporary IPv6 Address. . . . . . : fde2:49ff:5bc4:0:567:596b:42b4:ba5e(Preferred)
   Link-local IPv6 Address . . . . . : fe80::190a:577e:766d:e88a%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.91.180(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 27. juni 2024 20:51:46
   Lease Expires . . . . . . . . . . : 28. juni 2024 00:55:24
   Default Gateway . . . . . . . . . : 192.168.91.1
   DHCP Server . . . . . . . . . . . : 192.168.91.1
   DHCPv6 IAID . . . . . . . . . . . : 96998734
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-37-55-92-FC-5C-EE-6A-19-0F
   DNS Servers . . . . . . . . . . . : fde2:49ff:5bc4::1
                                       192.168.91.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Please help me figure out what fde2:49ff:5bc4::1 is, and what can be done to get a ipv4 served from hostnames in /etc/config/dhcp.

So, you used to, on previous Windows computers, manually disable IPv6 but not yet on this one because you want to block IPv6 using the router?

It is a little confusing, probably lost in translation.

if you're accessing your domain via a browser, have you disabled the default secure DNS ?

no one understands Danish - https://www.scandikitchen.co.uk/countindanish/

1 Like

I know the Finnish Danish translation was fine but you reminded me of this skit.

Yes, I have not disabled ipv6 on my windows pc (yet). it is not recommended by Microsoft to turn it off, so I would like a solution, that does not force me to disable ipv6 on my pc.

But I dont have ipv6 on my routers wan interface (most danish isp doesnt provide ipv6).

I have disabled Secure DNS in MS Edge, but still not connetion. Since both ping and nslookup fails to resolve, it is not a big surprise..

Do have these two interfaces in LuCI?

image

Edit wan6 and change the protocol to unmanaged.
Save, save and apply.

Then in wwan6 (again in edit) go to the DHCP server tab and remove/disable IPv6 DHCP server.

Thank you.
I have changed the protocol for wan6 to unmanaged, saved and applied.
But I dont have wwan6

We are shutting down IPv6:

These should be on the edit page, do the following:

Delegate IPv6 prefixes: uncheck

IPv6 assignment length: disabled

IPv6 prefix filter: leave on 'Please choose'

You deleted the post that suggested you do not need IPv6 because your ISP does not use it?

The post you mention, is above (Cannot resolve ipv4 for hosts in /etc/config/dhcp - #5 by tboege)

I guess I have to "shut down ipv6 on the lan interface.

I'm specifically talking about the one you deleted.
If you look at the satus page you should not have any IPv6 aaddresses handed out already.

If you do not want to shut down, it is just that I misunderstood and you can reverse what has been done.

I see, still confused but my bad

:

Do you want to still want to disable IPv6?

I have no DHCPv6 leases on the statuspage. And I have also disconnected and reconnected wifi and ran ipconfig /release & ipconfig /renew.

But still same problem:

C:\Windows\System32>nslookup nelson.fortunatus.dk
Server:  UnKnown
Address:  fde2:49ff:5bc4::1

*** No internal type for both IPv4 and IPv6 Addresses (A+AAAA) records available for nelson.fortunatus.dk

C:\Windows\System32>ping -n 1  nelson.fortunatus.dk
Ping request could not find host nelson.fortunatus.dk. Please check the name and try again.

I have not reverted the disabling of ipv6 on the router. It is not important for me - so for now, it would be nice if I could lookup the hosts specified with ipv4

Got it.

The only way I know to force the router to use IPv4 is to disable IPv6.

someone will help you with another way.

If it is the easiest way, I have no problem with disabling ipv6 on the router. I have already done as you suggested on the lan interface, but maybe something is missing

I'll be AFK for about 30 minutes while I eat dinner.

Lets go to lan for second and shut it down there too:

Thank you for your help until now. I think I found the problem.
I have another openwrt running as a dump ap. But Network|DHCP and DNS|Authoritative was enabled.
Interfaces|lan|DCHP server|General Setup|ignore interface was marked, but somehow the "authoritative" must have givet out ipv6 adresses and dns server

1 Like