[Pdns-users] How to avoid to be redirected to ad by my ISP if NXDOMAIN?

Ton van Rosmalen ton at netbase.nl
Fri Nov 13 22:04:34 UTC 2009


Hi Gerhard,

Gerhard Gaußling schreef:
> Am Freitag, 13. November 2009 schrieb Ton van Rosmalen:
>   
> <snip>
> Hello  Ton,
>
> thank you for your help. 
>   
You're welcome.
> In my network  172.16.240.1 is localhost , the router is 172.16.240.3.
>
> ~$ hostname
> ubuntu
> ~$ dig +short ubuntu
> 172.16.240.1
> ~$ dig +short localhost
> 127.0.0.1
>
>
> }
>
> ~$ sudo  egrep -v "(#|^ *$)" /etc/powerdns/pdns.conf
> allow-recursion=192.168.158.128,192.168.158.2,,172.16.0.0/16,,192.168.0.0/16,,10.0.0.0/8,,127.0.0.1,
>  allow-recursion-override=on
>  cache-ttl=20
> config-dir=/etc/powerdns
> daemon=yes
> disable-axfr=yes
>  disable-tcp=no
>  distributor-threads=3
> guardian=yes
>  launch=gmysql
> lazy-recursion=yes
> local-address=127.0.0.1
> local-port=53
>  log-dns-details=yes
>  log-failed-updates=yes
>  logfile=/var/log/pdns.log
>  loglevel=6
> module-dir=/usr/lib/powerdns
>  queue-limit=1500
>  recursive-cache-ttl=10
>  recursor=127.0.0.1:5300
> setgid=pdns
> setuid=pdns
> socket-dir=/var/run
>  use-logfile=yes
>  webserver=yes
>  webserver-address=127.0.0.1
>  webserver-password=xxxxx
>  webserver-port=8081
> version-string=powerdns
> include=/etc/powerdns/pdns.d
>
> ~$ sudo egrep -v "(#|^ *$)" /etc/powerdns/recursor.conf
>  allow-from=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 
> 172.16.0.0/12, ::1/128, fe80::/10
> delegation-only=com,net
> export-etc-hosts=on
>  local-address=127.0.0.1
> local-port=5300
>  log-common-errors=yes
>  spoof-nearmiss-max=20
> trace=on
>  version-string=PowerDNS Recursor 3.1-pre2 $Id: pdns_recursor.cc 835 
> 2006-05-12 17:23:41Z ahu $
>
> ~$ sudo egrep -v "(#|^ *$|pass)" /etc/powerdns/pdns.d/pdns.local.gmysql
>  gmysql-host=localhost
>  gmysql-dbname=pdns
>  gmysql-user=root
>  gmysql-socket=/var/run/mysqld/mysqld.sock
> ~$ sudo egrep -v "(#|^ *$)" /etc/powerdns/pdns.d/pdns.recursors
> recursor=172.16.240.3
> ~$ sudo egrep -v "(#|^ *$)" /etc/powerdns/pdns.d/pdns.local
>   
Ok, You're setting up an authorative server which uses a local recursor
as a forwarder.

Have you tried 'dig @localhost -p 5300' for results on the queries?

If you have no specific need for the authorative server I'd suggest
disabling that and running the recursor on port 53.

I'd remove the file /etc/powerdns/pdns.d/pdns.recursors as this sets up
a dns proxy to the router possibly overwriting the previous setting in
pdns.conf.

Hope this helps.

Ton



More information about the Pdns-users mailing list