please someone give me nft table rules for .nft file to redirect all dns queries except 10.10.10.100 to 10.10.10.100 to port 53
thanks in advance
Do you expect nftables changed since you asked a week ago?
1 Like
its different from that one now i am using another device as dns server 10.10.10.100 a client of my main openwrt router
I think that the point is not about the exact rule you previously used, but rather the fact that the syntax and process should be the same with a few minor modifications to use the updated DNS server.
Please try to use what you learned in the previous thread and see if you can adapt the rules. If you have problems, please show us what you tried and the let us know what happened.
1 Like
i tried this one but the problem is i am not getting response from my dns server
chain nat_prerouting {
type nat hook prerouting priority dstnat - 10; policy accept;
ip saddr 10.10.10.0/24 ip saddr != 10.10.10.100 meta l4proto { tcp, udp } th dport 53 dnat to 10.10.10.100:53
}
PS C:\Users\alyan> nslookup speedtest.net
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 10.10.10.1
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
PS C:\Users\alyan> ping 10.10.10.100
Pinging 10.10.10.100 with 32 bytes of data:
Reply from 10.10.10.100: bytes=32 time<1ms TTL=64
Reply from 10.10.10.100: bytes=32 time<1ms TTL=64
Reply from 10.10.10.100: bytes=32 time=1ms TTL=64
Reply from 10.10.10.100: bytes=32 time<1ms TTL=64
Ping statistics for 10.10.10.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PS C:\Users\alyan>