jbodhorn
I'm running fedora 21 on my chromebook and a while back I had screwed up pretty good, accidently installing packages from fedora server, this removed a bunch of fedora workstation packages when it installed the server packages. I had had openvpn setup up so that when my laptop booted, openvpn started, and connected to PIA's US East server. It took me forever to get my internet working again and even longer for me to get openvpn to connect and work again, I'm no linux guru, so please go easy on me...
This is what I get when I boot my fedora laptop and check the status of openvpn:
[joe@localhost ~]$ sudo systemctl status -l openvpn@US_East.service
[sudo] password for joe:
● openvpn@US_East.service - OpenVPN Robust And Highly Flexible Tunneling Application On US_East
Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled)
Active: active (running) since Wed 2015-04-29 12:29:39 EDT; 3min 16s ago
Process: 756 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.ovpn (code=exited, status=0/SUCCESS)
Main PID: 764 (openvpn)
CGroup: /system.slice/system-openvpn.slice/openvpn@US_East.service
└─764 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/US_East.pid --cd /etc/openvpn/ --config US_East.ovpn
Apr 29 12:32:09 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:14 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:19 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:24 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:29 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:34 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:39 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:44 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:49 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
Apr 29 12:32:54 localhost.localdomain openvpn[764]: RESOLVE: Cannot resolve host address: us-east.privateinternetaccess.com: Name or service not known
I found I have to stop and start the service and it works:
[joe@localhost ~]$ sudo systemctl stop openvpn@US_East.service
[joe@localhost ~]$ sudo systemctl start openvpn@US_East.service
[joe@localhost ~]$ sudo systemctl status -l openvpn@US_East.service
● openvpn@US_East.service - OpenVPN Robust And Highly Flexible Tunneling Application On US_East
Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled)
Active: active (running) since Wed 2015-04-29 12:33:24 EDT; 3s ago
Process: 2027 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.ovpn (code=exited, status=0/SUCCESS)
Main PID: 2028 (openvpn)
CGroup: /system.slice/system-openvpn.slice/openvpn@US_East.service
└─2028 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/US_East.pid --cd /etc/openvpn/ --config US_East.ovpn
Apr 29 12:33:24 localhost.localdomain openvpn[2027]: WARNING: file '/etc/openvpn/pass.txt' is group or others accessible
Apr 29 12:33:24 localhost.localdomain openvpn[2028]: UDPv4 link local: [undef]
Apr 29 12:33:24 localhost.localdomain openvpn[2028]: UDPv4 link remote: [AF_INET]108.61.76.9:1194
Apr 29 12:33:24 localhost.localdomain openvpn[2028]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Apr 29 12:33:24 localhost.localdomain openvpn[2028]: [Private Internet Access] Peer Connection Initiated with [AF_INET]108.61.76.9:1194
Apr 29 12:33:26 localhost.localdomain openvpn[2028]: TUN/TAP device tun0 opened
Apr 29 12:33:26 localhost.localdomain openvpn[2028]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Apr 29 12:33:26 localhost.localdomain openvpn[2028]: /usr/sbin/ip link set dev tun0 up mtu 1500
Apr 29 12:33:26 localhost.localdomain openvpn[2028]: /usr/sbin/ip addr add dev tun0 local 10.181.1.6 peer 10.181.1.5
Apr 29 12:33:26 localhost.localdomain openvpn[2028]: Initialization Sequence Completed
I couldn't figure out how to get it to work for nearly two weeks, I've become stubborn when it comes to asking for help anymore, I've been pretty successful the last few months figuring out how to fix problems using google...
I kept having errors with resolving host addresses using yum with or without openvpn started, stopped, enabled, or disabled, it took me forever to get the fedora workstation packages reinstalled, i'm still questioning whether or not I've gotten the removed workstation packages reinstalled because I lost track of what had been switched. I had changed none of my openvpn configs(which had worked before my accidental switching of workstation for server packages), they still work, but I have to do a stop and start service to get the vpn to work.
I ended up going into my routers settings and seeing that my router assigned dns name for this laptop was not the same as the hostname listed on my router. Every time I booted my laptop the router would assign a name like newhost-x, "x" being a number, instead of using the hostname on the laptop. I changed the laptop's hostname on the router and also set my lease time to static/unlimited so I get the same ip/dns name everytime I connect to that router.
Now as long as I do a stop and start I don't get any resolve errors with and my vpn will then work. Since changing the router dns settings I've not gotten the resolve errors when using yum, can anyone think of where I might check for the source of this problem or how to go about finding it? I had never had to set my dns name or have an unlimited lease in my router settings before this, it read the name from this machine just fine. The router seems to read and use the hostnames assigned by other machines operating systems on the network rather than me needing to assign it myself in the router, my two raspberry pi both show up with their operating system(one raspbian, one retropie) assigned hostnames and I have a few ubuntu laptops that seem to work just fine also.