Quantcast
Channel: Can IP tables allow specific DNS queries based on domain name? - Server Fault
Browsing latest articles
Browse All 4 View Live

Answer by Iceberg for Can IP tables allow specific DNS queries based on...

DOMAIN=www.example.comstr=$(perl -e 'print "|".join("|", map { sprintf("%02X", length($_))."|".$_ } split(/\./, "'$DOMAIN'") )."|"')echo $striptables -I INPUT -p udp --dport 53 -m string --hex-string...

View Article


Answer by Romuald Brunet for Can IP tables allow specific DNS queries based...

To complement nrc's anwser, where is a quick command to convert domains to the hexadecimal string:DOMAIN=google.comperl -e 'print map {chr(length($_)).$_} split /\./, "'$DOMAIN'" | xxd -pSo, in your...

View Article


Answer by nrc for Can IP tables allow specific DNS queries based on domain name?

the dot "." in a DNS query is not represented as a character, but as the length of the string that follows. For example www.google.com is queried as0x03 w w w 0x06 g o o g l e 0x03 c o myou can easily...

View Article

Can IP tables allow specific DNS queries based on domain name?

I have iptables blocking all UDP traffic at the moment, however I want to allow only certain DNS queries to get through.Let's use google.com as an example.I am trying to use string matching to find the...

View Article
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>