Skip to content

Instantly share code, notes, and snippets.

@programmerq
Last active April 1, 2019 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmerq/6be97755d5003a6e651224d0da5700d1 to your computer and use it in GitHub Desktop.
Save programmerq/6be97755d5003a6e651224d0da5700d1 to your computer and use it in GitHub Desktop.

client2.ovpn was generated by my asus router running merlin firmware. It's been used successfully on other devices.

I have a similar client1.ovpn file that uses a tun device instead of a tap device and it runs on port 1194. The tun VPN works in ubuntu networkmanager.

Both config files were imported using the following command:

sudo nmcli connection import type openvpn file client1.ovpn
sudo nmcli connection import type openvpn file client2.ovpn

Are there other log files to pull? Modules to install? The problem seems to be specifically because this client2.ovpn uses a tap instead of a tun.

client
dev tap
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap
proto udp
remote 1.2.3.4 1195
float
ncp-ciphers AES-128-GCM:AES-256-GCM:AES-128-CBC:AES-256-CBC
comp-lzo adaptive
keepalive 15 60
auth-user-pass
remote-cert-tls server
<ca>
-----BEGIN CERTIFICATE-----
REDACTED CERTIFICATE BLOCK. known to work on other devices that imported the same config.
-----END CERTIFICATE-----
</ca>
resolv-retry infinite
nobind
Apr 1 13:53:48 tu NetworkManager[1179]: <info> [1554141228.8405] audit: op="connection-activate" uuid="26f74ac1-4882-4719-bb4d-c478f0f1d870" name="client2" pid=2844 uid=1000 result="success"
Apr 1 13:53:48 tu NetworkManager[1179]: <info> [1554141228.8461] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: Started the VPN service, PID 13896
Apr 1 13:53:48 tu NetworkManager[1179]: <info> [1554141228.8540] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: Saw the service appear; activating connection
Apr 1 13:53:48 tu NetworkManager[1179]: <info> [1554141228.9806] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: starting (3)
Apr 1 13:53:48 tu NetworkManager[1179]: <info> [1554141228.9807] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN connection: (ConnectInteractive) reply received
Apr 1 13:53:48 tu nm-openvpn[13905]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2018
Apr 1 13:53:48 tu nm-openvpn[13905]: library versions: OpenSSL 1.1.0g 2 Nov 2017, LZO 2.08
Apr 1 13:53:49 tu nm-openvpn[13905]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Apr 1 13:53:49 tu nm-openvpn[13905]: TCP/UDP: Preserving recently used remote address: [AF_INET]1.2.3.4:1195
Apr 1 13:53:49 tu nm-openvpn[13905]: UDP link local: (not bound)
Apr 1 13:53:49 tu nm-openvpn[13905]: UDP link remote: [AF_INET]1.2.3.4:1195
Apr 1 13:53:49 tu nm-openvpn[13905]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
Apr 1 13:53:49 tu nm-openvpn[13905]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Apr 1 13:53:49 tu nm-openvpn[13905]: [RT-AC68U] Peer Connection Initiated with [AF_INET]1.2.3.4:1195
Apr 1 13:53:50 tu nm-openvpn[13905]: TUN/TAP device tap0 opened
Apr 1 13:53:50 tu nm-openvpn[13905]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --debug 0 13896 --bus-name org.freedesktop.NetworkManager.openvpn.Connection_3 --tap -- tap0 1500 1585 init
Apr 1 13:53:50 tu systemd-udevd[13907]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Apr 1 13:53:50 tu systemd-udevd[13907]: Could not generate persistent MAC address for tap0: No such file or directory
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6266] manager: (tap0): new Tun device (/org/freedesktop/NetworkManager/Devices/4)
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6362] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN connection: (IP Config Get) reply received.
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6377] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",4:(tap0)]: VPN connection: (IP4 Config Get) reply received
Apr 1 13:53:50 tu NetworkManager[1179]: <warn> [1554141230.6378] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",4:(tap0)]: invalid IP4 config received!
Apr 1 13:53:50 tu NetworkManager[1179]: <warn> [1554141230.6378] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",4:(tap0)]: VPN connection: did not receive valid IP config information
Apr 1 13:53:50 tu nm-openvpn[13905]: chroot to '/var/lib/openvpn/chroot' and cd to '/' succeeded
Apr 1 13:53:50 tu nm-openvpn[13905]: GID set to nm-openvpn
Apr 1 13:53:50 tu nm-openvpn[13905]: UID set to nm-openvpn
Apr 1 13:53:50 tu nm-openvpn[13905]: Initialization Sequence Completed
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6391] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: started (4)
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6397] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: stopping (5)
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6397] vpn-connection[0x563e70c7c140,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: stopped (6)
Apr 1 13:53:50 tu gnome-shell[1891]: Removing a network device that was not added
Apr 1 13:53:50 tu gnome-shell[2844]: Removing a network device that was not added
Apr 1 13:53:50 tu nm-openvpn[13905]: SIGTERM[hard,] received, process exiting
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6849] devices added (path: /sys/devices/virtual/net/tap0, iface: tap0)
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6849] device added (path: /sys/devices/virtual/net/tap0, iface: tap0): no ifupdown configuration found.
Apr 1 13:53:50 tu NetworkManager[1179]: <info> [1554141230.6885] devices removed (path: /sys/devices/virtual/net/tap0, iface: tap0)
tried setting `MACAddressPolicy=none` in /lib/systemd/network/99-default.link and tried connecting. Here's the syslog output:
Apr 1 14:29:40 tu NetworkManager[1179]: <info> [1554143380.2496] audit: op="connection-activate" uuid="26f74ac1-4882-4719-bb4d-c478f0f1d870" name="client2" pid=2844 uid=1000 result="success"
Apr 1 14:29:40 tu NetworkManager[1179]: <info> [1554143380.2536] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: Started the VPN service, PID 18142
Apr 1 14:29:40 tu nm-tray.desktop[15588]: networkmanager-qt: virtual void NetworkManager::ActiveConnectionPrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "StateFlags"
Apr 1 14:29:40 tu NetworkManager[1179]: <info> [1554143380.2585] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: Saw the service appear; activating connection
Apr 1 14:29:40 tu NetworkManager[1179]: <info> [1554143380.3799] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: starting (3)
Apr 1 14:29:40 tu NetworkManager[1179]: <info> [1554143380.3799] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN connection: (ConnectInteractive) reply received
Apr 1 14:29:40 tu nm-openvpn[18148]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2018
Apr 1 14:29:40 tu nm-openvpn[18148]: library versions: OpenSSL 1.1.0g 2 Nov 2017, LZO 2.08
Apr 1 14:29:40 tu nm-openvpn[18148]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Apr 1 14:29:40 tu nm-openvpn[18148]: TCP/UDP: Preserving recently used remote address: [AF_INET]1.2.3.4:1195
Apr 1 14:29:40 tu nm-openvpn[18148]: UDP link local: (not bound)
Apr 1 14:29:40 tu nm-openvpn[18148]: UDP link remote: [AF_INET]1.2.3.4:1195
Apr 1 14:29:40 tu nm-openvpn[18148]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
Apr 1 14:29:40 tu nm-openvpn[18148]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Apr 1 14:29:40 tu nm-openvpn[18148]: [RT-AC68U] Peer Connection Initiated with [AF_INET]1.2.3.4:1195
Apr 1 14:29:41 tu nm-openvpn[18148]: TUN/TAP device tap0 opened
Apr 1 14:29:41 tu nm-openvpn[18148]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --debug 0 18142 --bus-name org.freedesktop.NetworkManager.openvpn.Connection_13 --tap -- tap0 1500 1585 init
Apr 1 14:29:41 tu systemd-udevd[18149]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9001] manager: (tap0): new Tun device (/org/freedesktop/NetworkManager/Devices/17)
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9052] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN connection: (IP Config Get) reply received.
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9062] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",17:(tap0)]: VPN connection: (IP4 Config Get) reply received
Apr 1 14:29:41 tu NetworkManager[1179]: <warn> [1554143381.9062] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",17:(tap0)]: invalid IP4 config received!
Apr 1 14:29:41 tu NetworkManager[1179]: <warn> [1554143381.9063] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",17:(tap0)]: VPN connection: did not receive valid IP config information
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9074] devices added (path: /sys/devices/virtual/net/tap0, iface: tap0)
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9074] device added (path: /sys/devices/virtual/net/tap0, iface: tap0): no ifupdown configuration found.
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9074] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: started (4)
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9087] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: stopping (5)
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9088] vpn-connection[0x563e70c7c540,26f74ac1-4882-4719-bb4d-c478f0f1d870,"client2",0]: VPN plugin: state changed: stopped (6)
Apr 1 14:29:41 tu nm-openvpn[18148]: chroot to '/var/lib/openvpn/chroot' and cd to '/' succeeded
Apr 1 14:29:41 tu nm-openvpn[18148]: GID set to nm-openvpn
Apr 1 14:29:41 tu nm-openvpn[18148]: UID set to nm-openvpn
Apr 1 14:29:41 tu nm-openvpn[18148]: Initialization Sequence Completed
Apr 1 14:29:41 tu NetworkManager[1179]: <info> [1554143381.9165] devices removed (path: /sys/devices/virtual/net/tap0, iface: tap0)
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "AllDevices"
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
Apr 1 14:29:41 tu nm-tray.desktop[15588]: networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "AllDevices"
Apr 1 14:29:41 tu gnome-shell[1891]: Removing a network device that was not added
Apr 1 14:29:41 tu gnome-shell[2844]: Removing a network device that was not added
Apr 1 14:29:41 tu nm-openvpn[18148]: SIGTERM[hard,] received, process exiting
Apr 1 14:30:20 tu org.gnome.Shell.desktop[2844]: [5236:5259:0401/143020.170794:ERROR:appcache_update_url_loader_request.cc(138)] Not implemented reached in virtual void content::AppCacheUpdateJob::UpdateURLLoaderRequest::OnTransferSizeUpdated(int32_t)
@pakair
Copy link

pakair commented Apr 1, 2019

Change MACAddressPolicy=persistent to none in /lib/systemd/network/99-default.link and try ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment