You are not logged in.
Hi,
due to some internet connection problem (provider) I couldn't update arch for nearly 3 month. On October 7th after reading the news I then did a full system upgrade. Everything works fine since then, except openvpn.
Before the update, the openvpn connection was running and working right after boot. Now the status says, that openvpn is active and running, but I don't get access to the internet. After a restart of the connection, everything works fine.
Right after boot the status looks like this (everything seems to be fine):
$ systemctl status openvpn@stw-bonn
openvpn@stw-bonn.service - OpenVPN connection to stw-bonn
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled)
Active: active (running) since Mo 2013-10-21 16:10:08 CEST; 1h 16min ago
Process: 619 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i (code=exited, status=0/SUCCESS)
Main PID: 630 (openvpn)
CGroup: /system.slice/system-openvpn.slice/openvpn@stw-bonn.service
└─630 /usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/stw...
but a ping results into this:
$ ping -c 3 www.google.com
PING www.google.com (173.194.113.144) 56(84) bytes of data.
--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2008ms
In journalctl I couldn't find any messages/warnings/errors relating to openvpn.
The service file looks like this:
$ cat /etc/systemd/system/multi-user.target.wants/openvpn@stw-bonn.service
[Unit]
Description=OpenVPN connection to %i
After=network.target
Requires=network.target
[Service]
Type=forking
ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i
[Install]
WantedBy=multi-user.target
After restarting the service, everything works fine and the status looks identically like above:
$ systemctl status openvpn@stw-bonn
openvpn@stw-bonn.service - OpenVPN connection to stw-bonn
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled)
Active: active (running) since Mo 2013-10-21 18:01:07 CEST; 13s ago
Process: 1465 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i (code=exited, status=0/SUCCESS)
Main PID: 1466 (openvpn)
CGroup: /system.slice/system-openvpn.slice/openvpn@stw-bonn.service
└─1466 /usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/stw-bonn.conf --daemon openvpn@stw-bonn
The only difference I noticed is with ifconfig.
BEFORE:
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.82.241 netmask 255.255.255.0 broadcast 192.168.82.255
inet6 fe80::21d:60ff:fec0:9067 prefixlen 64 scopeid 0x20<link>
ether 00:1d:60:c0:90:67 txqueuelen 1000 (Ethernet)
RX packets 1762 bytes 132539 (129.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71 bytes 11438 (11.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 2 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 3732 bytes 280488 (273.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3732 bytes 280488 (273.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
AFTER:
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.82.241 netmask 255.255.255.0 broadcast 192.168.82.255
inet6 fe80::21d:60ff:fec0:9067 prefixlen 64 scopeid 0x20<link>
ether 00:1d:60:c0:90:67 txqueuelen 1000 (Ethernet)
RX packets 2016 bytes 156148 (152.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134 bytes 16759 (16.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 2 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 4116 bytes 309288 (302.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4116 bytes 309288 (302.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 131.220.99.182 netmask 255.255.255.255 destination 192.168.1.31
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 2 bytes 152 (152.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 152 (152.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
So the missing tun0 before restarting the openvpn service seems to be the reason for the not working internet connection. But right now I've no idea how to fix this.
Hopefully here is someone who knows.
regards,
inside-hex
---------------
RESOLVED - Solution
Since I had a lot of trouble with dhcpcd this last week or two and today time enough to investigate, I finally found a solution (by switching from dhcpcd to systemd-networkd).
1. Stop and disable dhcpcd, stop openvpn
2. Set up a basic dhcp network config file for networkd: https://wiki.archlinux.org/index.php/Sy … CP_network
3. cp /usr/lib/systemd/system/openvpn@.service /etc/systemd/system/openvpn@.service
4. Add in /etc/systemd/system/openvpn@.service:
[Unit] ...
After=systemd-networkd.service
[Service] ...
Restart=always
RestartSec=15
5. Enable systemd-networkd, systemd-resolve and openvpn (start now, if you don't want to reboot)
No trouble with failed dhcpcd every few minutes or so and openvpn automatically connects when the system boots again. :-)
Last edited by inside-hex (2015-04-30 18:15:18)
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Offline
Does nobody knows anything to solve this?
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Offline