Re: Raw Expression for DNS name?

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

 



Terrible or not is besides the point. There are numerous occasions
where people have used software features to design unique products for
special circumstances.

If the software allows it then it should work. If it does not then I
would like to know.

Thanks.



On Sun, May 24, 2020 at 9:44 PM Reindl Harald <h.reindl@xxxxxxxxxxxxx> wrote:
>
>
>
> Am 25.05.20 um 03:02 schrieb ad^2:
> > Does anyone have examples showing the use of a raw expression to
> > filter DNS domain name information?
> >
> > I'm trying to DNAT a packet to a specific DNS server's IP address when
> > the domain name in the query is a match.
> >
> > Ex. if the domain in the query is yahoo.com then redirect to 8.8.8.8
> >
> > I am not sure on the hex syntax.
> >
> > What is not working:
> >
> >     add rule mytable prerouting meta l4proto udp udp dport 53
> > @th,160,120 0x057961686f6f03636f6d00 dnat 8.8.8.8
> >
> > and
> >
> > add rule mytable prerouting meta l4proto udp udp dport 53 @th,160,120
> > 0x057961686f6f03636f6d dnat 8.8.8.8
> >
> > I used the hex values directly from the packet capture.
>
> a terrible idea to even consider on netfilter level
>
> that has to be done on the dns resolver and the only job of netfilter is
> forbid outside nameservers at all



[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