Page 1 of 1

Force specific address list to use specific DNS

Posted: Tue Nov 01, 2022 10:20 am
by Mehrdadx
Hi

i have 3 prerouting rules (Telegram and Whatapp IPs) that use mark routing (for VPN)

chain=prerouting action=mark-routing new-routing-mark=VPN passthrough=yes dst-address-list=Telegram IPs
chain=prerouting action=mark-routing new-routing-mark=VPN passthrough=yes dst-address-list=WhatsAPP
chain=prerouting action=mark-routing new-routing-mark=VPN passthrough=yes dst-address-list=DNS (1.1.1.1 and 8.8.8.8 )

problem is 1.1.1.1 and 8.8.8.8 is blocked in Iran and i have to sent these DNS to VPN gateway

now i want only packets with Des Address list=Telegram and Des Address list=WhatsApp use 1.1.1.1/8.8.8.8 as DNS

how can i do that ?

Re: Force specific address list to use specific DNS

Posted: Wed Nov 02, 2022 5:04 am
by Sob
Try again, it's not clear (to me at least) what you want. DNS resolves names to IP addresses. Once you have IP addresses and send packets to them, they no longer have anything to do with DNS.