Auto-updating resolv.conf in centos after vpn connection

CentOS / Redhat doesn’t come with resolvconf package which acts as a middleman between applications which supply dns resolution information and /etc/resolv.conf.

However openresolv is available for centos which works as an alternate for resolvconf and also provides same binary.

Following steps can be used to add resolvconf and further use that to update resolv.conf whenever openvpn connection is set up

  1. Download openresolv from and install. Check the availability of resolvconf command.
  2. Download script for updating resolv conf which is available in openvpn package for ubuntu but not in centos. The script is given at . Save the file say /etc/openvpn/update-resolv-conf . Make it executable.
  3. Append following lines in openvpn ovpn script
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf 

Can’t connect to WPA/WPA2 Enterprise Wifi Network in Ubuntu

Sometimes you may find that you are in some Enterprise Wifi network and you can connect in Windows but not in Ubuntu without CA server certificate.

The following workarounds can help solve the problems:

Open /etc/NetworkManager/system-connections/<WifiName>  file with super-user permissions. <WifiName> is the name of Wifi Network( If name if “Corp Wifi”, the file name should be “Corp\ Wifi”) If no such file exist than you have not connected to Wifi yet. Try connecting to Wifi once.

If any prompt comes asking for CA Server Certificate, select Ignore.

Open /etc/NetworkManager/system-connections/<WifiName> file and remove the following line


I found this solution on stackoverflow where this solution was reportedly not working on 14.04.

For 14.04 instead of removing complete line,
Change the line to


The second solution for 14.04 worked for me. If any of the solution is not working then please comment below.

Increasing speed of Tor

Follow the given procedure to speed up the tor.

  1. Backup the torrc file, save as torrc.bak.
  2. Append the following lines in the torrc file.

# Try for at most NUM seconds when building circuits. If the circuit isn't
# open in that time, give up on it. (Default: 1 minute.)
CircuitBuildTimeout 5
# Send a padding cell every N seconds to keep firewalls from closing our
# connections while Tor is not in use.
KeepalivePeriod 60
# Force Tor to consider whether to build a new circuit every NUM seconds.
NewCircuitPeriod 15
# How many entry guards should we keep at a time?
NumEntryGuards 8