This my second question is a continuation of my first one.
Setup is default Kali 2 and configured anonymous
user from TransparentProxy manual on it.
While I'm using nameserver 127.0.0.1
in /etc/resolv.conf
- everything is fine. All console network-tools like dig
, nslookup
, host
, etc, are working normally with resolving *.onion domains into IP addresses.
But, If dhclient
rewriting /etc/resolv.conf
with my local DNS-servers, this idyll disappearing...
As you can read from my first question, I'm catching DNS-requests with Wireshark on lo
-interface. dig
to *.onion domains - redirected to lo
by iptablres well, but other network-tools - not.
Why does iptables redirect works with every other domains, but does not works with *.onion and requires nameserver 127.0.0.1
?
Or
My question may sounds like: Why does nameserver 127.0.0.1
exists in TransparentProxy configuration, if iptables already configured to redirect every DNS-request to any IP-address to loop-back
:53?
EDIT: Specially for @canonizing ironize:
$IPT -t nat -A OUTPUT ! -o lo -p tcp -m owner --uid-owner anonymous -m tcp -j REDIRECT --to-ports 9040
$IPT -t nat -A OUTPUT -p udp -m owner --uid-owner anonymous -m udp --dport 53 -j REDIRECT --to-ports 53
$IPT -t filter -A OUTPUT -p tcp -m owner --uid-owner anonymous -m tcp --dport 9040 -j ACCEPT
$IPT -t filter -A OUTPUT -p udp -m owner --uid-owner anonymous -m udp --dport 53 -j ACCEPT
$IPT -t filter -A OUTPUT ! -o lo -m owner --uid-owner anonymous -j REJECT
Anyway, I can not find difference between *.onion domains and other... And how does this difference depend on /etc/resolv.conf
.
iptables
rules are correct for your setup? Note that those on the wiki are explicitly marked as an example and come with a set of assumptions.