21.10: NetworkManager's OpenVPN client: how to set 'ifconfig-push'

I am trying to configure OpenVPN clients with a fixed IP address. I think there are two main approaches: ifconfig-pool-persist on the server or ifconfig-push on the client. After some difficulties in making ifconfig-pool-persist work, I decided to try the ifconfig-push approach.

My OpenVPN clients are Ubuntu laptops (21.10 for instance), so we are using NetworkManager's OpenVPN configuration.

My issues:

  • In NetworkManager's OpenVPN GUI, I cannot find a way to add the ifconfig-push option.
  • In NetworkManager's OpenVPN configuration files, I cannot find where to put the ifconfig-push option.

As far as I understand, the configuration files are in /etc/NetworkManager/system-connections. I took an example.ovpn file online and imported it in the GUI, which generated a /etc/NetworkManager/system-connections/example.nmconnection file looking like this:

[connection]
id=example
uuid=183aaf3d-6974-41e7-abea-f4d0b3ae1a41
type=vpn
permissions=
[vpn]
ca=/home/bibi/.cert/nm-openvpn/example-ca.pem
cert=/home/bibi/.cert/nm-openvpn/example-cert.pem
cert-pass-flags=0
cipher=BF-CBC
comp-lzo=adaptive
connection-type=tls
dev=tun
key=/home/bibi/.cert/nm-openvpn/example-key.pem
ping=10
ping-restart=120
port=1194
remote=example.com
remote-cert-tls=server
ta=/home/bibi/.cert/nm-openvpn/example-tls-auth.pem
ta-dir=1
service-type=org.freedesktop.NetworkManager.openvpn
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]

Adding an ifconfig-push rule to the example.ovpn file before importing did not result in any change of the example.nmconnection file.

Is this setting entirely ignored?

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like