forked from RMerl/asuswrt-merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Secure DNS queries using DNSCrypt
josemedaglia edited this page Nov 8, 2014
·
2 revisions
Here is another tutorial by ryzhov_al about enabling OpenDNS on asuswrt routers
1 - Install Entware
2 - Upgrade Entware to have it find the right repository:
opkg update && opkg upgrade
3 - Install dnscrypt:
opkg install dnscrypt-proxy hostip
4 - Tell router to use it:
echo "no-resolv" > /jffs/configs/dnsmasq.conf.add
echo "server=127.0.0.1#65053" >> /jffs/configs/dnsmasq.conf.add
5 - Paste this content to /jffs/scripts/wan-start:
#!/bin/sh
# Wait up to 15 seconds to make sure /opt partition is mounted
i=0
while [ $i -le 15 ]
do
if [ -d /opt/tmp ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
# Now resolve DNS name for NTP server
rm -f /jffs/configs/hosts.add
ntp_name=$(nvram get ntp_server0)
for ip in $(/opt/bin/hostip $ntp_name)
do
echo $ip $ntp_name >> /jffs/configs/hosts.add
done
# and restart NTP client to eliminate 4-5 mins delay
killall ntp && sleep 1
service restart_ntpc
6 - Make the script executable:
chmod +x /jffs/scripts/wan-start
7 - Reboot router and make sure it works by visiting this page
More info here http://forums.smallnetbuilder.com/showthread.php?t=11645