I made a script to set google ipv4 dns as nameservers. Enables faster surfing & is apparently secure
- see: https://developers.google.com/speed/pub ... docs/intro (also has ipv6 info).
It needs to run after dhcp has set it's default.
16Nov24 EDIT: simpler, ok solution is 3 posts down.
As I have a savefolder, to make it run after dhcp settings, I needed a sleep 8 (may need 12)
To make it run last & not hold up other processes, I called it zsetresgoo , made it executable & put it in /root/Startup
The first echo overwrites resolv.conf & the second echo appends that file
Code: Select all
#!/bin/sh
sleep 8
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
An issue - if you suspend (i.e. close laptop lid), upon resume, previous settings return. A hack fix is to add the
following code to the end of /etc/acpi/actions/suspend.sh (optimal timings can vary with different pcs)
Code: Select all
sleep 16
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf