How to DNAT on LuCI? No option to rewrite Destination IP

@grrr2 Here is my config
I have replied to my own post with config

have you tried with my working rule 1) ? is it working for you too? or still not?

This is working -
Here destination is "this device"

config redirect
	option target 'DNAT'
	option name 'DNS Rewrite'
	option src 'lan'
	option src_dport '53'
	option dest_ip '192.168.1.1'
	option dest_port '53'

Also in "Your Rule 2" Why are you using option dest 'lan' and option src 'lan' both lan ?

But the same with option dest_ip '8.8.8.8' is not working that is "Your Rule 1" isn't working for me.

yes this works because this device means the router itself and the ip address is known to the router as it is an interface address, existing on the router. but 8.8.8.8 is not known. by specifying destination zone you tell the firewall where to look, i.e. in which kind of traffic it should modify. in your case you want to modify the traffic from lan forwarded to wan. so please use the dest zone and it will be ok.

  1. This is not working. DNS is not redirected.
    RE: This Work.
    image

  2. Unspecified and WAN shows this device


    image image

i cannot follow you ... why WAN zone is used as source? and why 9.9.9.9 in LAN zone?
you seem to mix the directions.

you want you LAN clients (=source zone) when try to reach any ip:53 on WAN for DNS service to be forced instead to 8.8.8.8:53 (=destination zone WAN).

my examples rule 1) does exactly. can you try exactly that rule without modification and report back if it works or not?

Internet doesn't work like I said in the previous post here I try it again and it still doesn't work -

i cannot follow you ... why WAN zone is used as source?

1 Sorry got confused. Ignore that.

and why 9.9.9.9 in LAN zone? you seem to mix the directions.

2 9.9.9.9 is in "internal IP"

3 Update: It works! but somethings it doesn't :frowning_face: that is, it doesn't redirect DNS. Mostly it doesn't, unless I block all other DNS but that also causes some devices to not be able to connect to internet.