[nftables v0.9.2 | kernel 4.19.93] does redirect accept daddr?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The aim is to prevent DNS query hijacking (e.g. as Android tries)

table nat {
    chain prerouting    { oif br-lan ip daddr != 192.168.112.12 udp dport 53 redirect to ip daddr 192.168.112.12;  }
}

hooks/prio is otherwise defined but it prints this ominous error:

Error: syntax error, unexpected semicolon

Removing the offending semicolon it then prints:

Error: syntax error, unexpected newline

It is a bit difficult to understand what the issue really is.

----

Alternatively, this

table nat {
    chain prerouting    {  oif br-lan ip daddr != 192.168.112.12 udp dport 53 ip daddr set 192.168.112.12; }
}

or a bit shorter even

table nat {
    chain prerouting    {  oif br-lan ip daddr != 192.168.112.12 udp dport 53 ip daddr 192.168.112.12; }
}

does not throw an error but I am not sure whether that achieves the in the context of the table?





[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux