DNS Filtering for specific user

i've been build server for DNS Filtering and i want to forward my openwrt to my DNS server
i'm using the iptables for forwarding the port of DNS

iptables -t nat -A PREROUTING -p udp -s 192.168.1.129 --dport 53 -j DNAT --to-destination xxx.xxx.xx.xx:xxx

and i got DNS_PROBE_FINISHED_NO_INTERNET

Why are you using the firewall to assign a DNS server?

Just assign the server via DHCP, or on the client statically.

config host
	option ip '192.168.1.129'
	option mac 'xx:xx:xx:xx:xx:xx'
	option name 'pc_dns_filtered'
	option dns '1'
	option tag 'filtered_dns'

config tag 'filtered_dns'
	list dhcp_option '6,8.8.8.8,8.4.4.4'

Also have a look at this: https://openwrt.org/docs/guide-user/firewall/fw3_configurations/forced_dns_redirection

can i definied port on list dhcp_option?

Not there, but you can define in dnsmasq.

i already trying this but still not working

when i define in dnsmasq, can i define for spesific user?

Yes, @lleachii explained it here.

with a spesific port of DNS Server?

As far as I know you cannot push the port of the NS via DHCP.

My two cents: why don't you keep the OpenWrt router as a DNS, and configure the filtering DNS as an upstream DNS? Seems far easier than this.

Can that be done in such a way that the upstream DNS is on the router itself? This would make setting up per VLAN DNS rules much easier.

Of course. I.e. for parental control, I run a customized powerdns-resolver as upstream DNS for dnsmasq, on same router.

How? I really can't seem to figure out how to get another DNS server speaking on another IP from the same box, or however it is you chain that so you can have different DNS filtering rules for different VLANs.

I do not use different VLANs, but I do MAC-based filtering on the (upstream) powerdns. Thus, all DNS-requests pass dnsmasq, which provides the MAC of client, and powerdns does the serious processing. KISS :slight_smile:

There are several ways for "Split DNS"
Popular are DHCP option 6 and DNS hijacking
For some more background see: