Port Forward: Access service on LAN side of router

Hello.

I'm sorta new to OpenWRT. But, have used dd-wrt much in the past.

I'm using dnsmasq on the router, OpenWRT/lan:53 From my LAN, everything works as it should.

What I'd like to do, it it's possible. to forward a WAN port 8853 -> LAN:53 (router)

I have a few port forwards on OpenWRT, they all work as expected.

I'm trying to forward public port 8853 to 192.168.1.1:53

So, DNS clients on the Internet can use my DNS running on the router.

Example:

dig -p 8853 +short myworkstation.lan @MyRealInternetDomainName.net

But, it just hangs.

When I ran dnamsq on another Raspberry Pi4, the port forwarding worked from my OpenWRT on a pi4.

I guess my first question is, can this be done?

Running OpenWRT Snapshot Aug 22nd
Raspberry Pi4

As I say, it's all running like a charm, just want to access my DNS running under OpenWRT from the Internet.

If the service runs on the same host, you can just open the port, no need to forward it.
Using custom ports for DNS is not a good idea as most clients do not support that way.
Opening DNS to the internet is a bad idea, unless you really know what you are doing, but then you wouldn't be asking this question.
It's best to limit access to the service to allow only trusted clients:
https://openwrt.org/docs/guide-user/services/vpn/start

1 Like