8

I've tried to find a way to configure a new connection manageable by NetworkManager using a terminal/shell script all day long, but I've been unsuccessful.

The reason is that I have a lot of openvpn configuration files and I wanted to have a nice and fast way of importing them, also beacuse NetworkManager openvpn plugin doesn't parse the certificates embedded into configuration files, so the only way to configure a new VPN connection is to do that manually via the GUI after I run a script to extract the certificates from the config files, which is a rather long and tedious process.

I found that on RedHat the nmcli utility has the ability to configure a new connection in this way:

nmcli con add [...]

However this is not possibile on (standard) Linux Mint 17.1.

I tried to add a new connection manually, adding a new file in /etc/NetworkManager/system-connections

[connection]
id=VPNConnection
id=3389cf54-949e-4c69-a746-864f0f8720b8
type=vpn

[vpn]
service-type=org.freedesktop.NetworkManager.openvpn
fragment-size=1300
connection-type=password-tls
password-flags=1
auth=MD5
tunnel-mtu=1500
cipher=AES-256-CBC
comp-lzo=yes
cert-pass-flags=0
remote=[vpn provider]
port=[vpn port]
mssfix=yes
username=[username]
remote-cert-tls=server
cert=[user cert]
ca=[ca cert]
key=[user priv. key]

[ipv6]
method=ignore

[ipv4]
method=auto

but this new configuration doesn't show up in NetworkManager.

Also, I don't have any ~/.gconf/system directory, neither under my personal home nor under /root.

Where could NetworkManager read configuration files from?

  • I have the very same issue -- have you been able to find a solution in the meantime? Thanks! (I believe that one option is to get the experimental package of NM 1.0 but I don't want to mess with my system that way.) – nhee May 30 '15 at 10:12
8

Check your /etc/NetworkManager/NetworkManager.conf

Under [main] there should be a plugins directive and if you have enabled the keyfile plugin (i.e. plugins=keyfile,ifupdown or similar), it should monitor the /etc/NetworkManager/system-connections/ directory for file changes.

Further, a man NetworkManager.conf tells you that 'it will ignore files that are readable or writeable by any user or group other than root'.

Don't know if this solves your problem, but it is worth checking out!

According to this, it should work with NetworkManager v7+

Cheers! / Daniel

| improve this answer | |
1

This worked for me:

nmcli reload "your connection name"

followed by a reboot. Reactivation will probably work as well.

| improve this answer | |
  • 2
    I am having the exact same problem. But the reload command is not included in my version of NetworkManager (most current package for Raspbian Wheezy). Any other idea? Rebooting and restarting the service didn't help either. – nhee May 30 '15 at 10:12
  • 1
    I think nmcli connection reload "your connection name" is the correct one. – Michael Hirschler Nov 8 '17 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.