[Routing][Problem]OpenWrt solves the problem that LAN devices cannot access the host through the domain name

1. Problem description

The test found that after using OpenWrt for port forwarding or Upnp, the local LAN device uses the domain name to access the host but cannot access it.

2. Problem analysis

This problem belongs to "NAT loopback problem" after inquiry, but OpenWrt automatically set up NAT loopback when doing port forwarding, and has set WAN port inbound data and forwarding to "accept" but it is invalid. .

It can be said that the article solves the problem of "OpenWrt enables NAT loopback but is invalid"

2.1 The WAN port has enabled inbound data and forwarding functions

image-20230111153606845

2.2 Port forwarding enables NAT loopback by default

image-20230111153341240

3. Problem Solving

This is because our port forwarding does not listen to the data of the LAN port at all

3.1 Change the listening port

Click edit in the picture

image-20230111153909990

Join the LAN port

image-20230111153953179

Save & Apply

4. Test

There is no problem with the local LAN setting to access the LAN host through the domain name (port forwarding)

There is no problem with the local LAN setting to access the LAN host through the domain name (UPNP)

5. Reference

When openwrt sets port forwarding, the solution to the inability to access the intranet

Xiaobai's learning and understanding of OpenWrt firewall IPv4 NAT loopback (NAT Loopback)

Guess you like

Origin blog.csdn.net/qq_38844263/article/details/128646124