You are not logged in.
Pages: 1
I have Openvpn client working, but not the DNS and resolvconf part.
I've followed the Openvpn wiki page and used the script (https://wiki.archlinux.org/index.php/OpenVPN#DNS). I added the bash "-x" flag to follow its execution. It runs but does nothing to my resolv.conf file.
I've also tried replacing the above script with a one liner hard coded for what my Openvpn server is sending back: "echo -n 'nameserver 8.8.8.8 8.8.4.4' | resolvconf -a tun0". It runs but no resolve.conf changes.
The only way I've gotten /etc/resolv.conf to update is after the Openvpn client is connected I manually run the above one line script in a bash shell outside of the openvpn client config file.
I'm running everything at root (for now). Thanks for any help.
Last edited by mixer (2013-08-21 12:40:55)
Offline
Check the write-attributes for /etc/resolv.conf with:
lsattr /etc/resolv.conf
If the file is immutable (noted by an 'i' from the previous command) then the file will not be edited. Change the attribute and edit the file. Then change the attribute back to immutable to prevent automatic editing at boot.
Other possible culprits may listed in the this arch wiki page
https://wiki.archlinux.org/index.php/Resolv.conf
Offline
I had the same problem, I just made a script to delete resolv.conf, rewrite it, and open openvpn. Run this to start OpenVpn, hope it helps:
#!/bin/bash
rm -f /etc/resolv.conf
echo -e "# Generated by resolvconf" >> /etc/resolv.conf
echo -e "nameserver 208.67.222.222" >> /etc/resolv.conf # Sets OpenDNS
echo -e "nameserver 208.67.220.220" >> /etc/resolv.conf
openvpn # Enter openvpn config file to start
Offline
I appreciate the responses. I have been away from my Arch box and unable to investigate further. I'll will follow-up when I have time.
Offline
This is like the fourth issue with vpns and dns this week. Might be a bug somewhere, where the vpn is changing the /etc/resolv.conf incorrectly. I had an issue with OpenVpn messing up my dns. I had to use this response to fix my problem. Kind of a hack, but it worked for me.
Offline
Pages: 1