connection_name.config(5)
π connection_name.config β the ConnMan VPN provisioning file, bestie edition π
okay so real talk: this is the connection_name.config(5) manual page from the File Formats Manual section. it's a lot, but we're gonna get through it together, and by the end you're gonna be genuinely obsessed. π
β¨ SYNOPSIS β¨
/var/lib/connman-vpn/connection-name.config
πΈ DESCRIPTION πΈ
so ConnMan's vpn connections get configured with these little guys called "provisioning files", and they live under /var/lib/connman-vpn/. π
the files can be named literally anything you want, as long as they only contain printable ascii characters β think letters, numbers, underscores, that vibe. and the file must end with .config. no exceptions, bestie, that's the rule. π¦
every single VPN connection needs its own provisioning file, but here's the slay: you can put multiple connections in the same file. efficient queen behavior. π
π FILE FORMAT π
the config file is made of sections (aka groups) of key-value pairs. let's break it down:
- lines that start with a
#are comments, and so are blank lines β they get ignored, no notes taken π - sections start with a header line that has the section name wrapped in
[and] - a section ends implicitly β either when the next section starts or when the file justβ¦ ends π
- and every key-value pair must live inside a section. no orphan keys allowed, they need a home π
description of sections and available keys follows:
π§Έ [global] π§Έ
this section is optional, and it's basically where you describe the file itself. there are two allowed fields here:
Name=nameβ the name of the network.Description=descriptionβ the description of the network.
π [provider_*] π
every provisioned connection has to start with a [provider_*] tag, where the * gets replaced by a name that's unique within the file. these next fields are mandatory, no skipping:
Type=OpenConnect | OpenVPN | VPNC | L2TP | PPTPβ specifies the VPN type.Host=IPβ the VPN server IP address.Domain=domainβ domain name for the VPN service.
and this next one is optional:
Networks=network/netmask/gateway[,...]β networks behind the VPN. if all traffic should go through the VPN, you can just leave this field out entirely. the gateway can be left out too. and for IPv6 addresses, only the prefix length is accepted as the netmask. π‘
π OpenConnect π
these keys can be used for openconnect(8) networks:
OpenConnect.ServerCert=certβ SHA1 fingerprint of the VPN server's certificate.OpenConnect.CACert=certβ file containing additional CA certificates, on top of the system trusted certificate authorities.OpenConnect.ClientCert=certβ client certificate, if web authentication needs one.OpenConnect.MTU=mtuβ requestmtufrom the server as the MTU of the tunnel.OpenConnect.Cookie=cookieβ the resulting cookie of the authentication process. but heads up bestie, since the cookie lifetime can be very limited, it doesn't usually make sense to put it in the configuration file. πOpenConnect.VPNHost=hostβ the final VPN server to use after completing the web authentication. only usable for extremely simple VPN configurations, and should normally be set only via the VPN Agent API. lowkey niche.
ifOpenConnect.Cookie,OpenConnect.VPNHostorOpenConnect.ServerCertare missing, the VPN Agent will be contacted to supply that info. it's got you. π«Ά
π‘οΈ OpenVPN π‘οΈ
these keys are mandatory for openvpn(8) networks:
OpenVPN.CACert=certβ certificate authority file.OpenVPN.Cert=certβ local peer's signed certificate.OpenVPN.Cert=certβ local peer's signed certificate.OpenVPN.Key=keyβ local peer's private key.
and these keys are optional for openvpn(8) networks:
OpenVPN.MTU=mtuβ MTU of the tunnel.OpenVPN.NSCertType=client | serverβ peer certificate type, eitherclientorserver.OpenVPN.Proto=protocolβ useprotocol.OpenVPN.Port=portβ TCP/UDP port number.OpenVPN.AuthUserPass=true | falseβ authenticate on the server using username/password.OpenVPN.AskPass=fileβ get certificate password fromfile.OpenVPN.AuthNoCache=true | falseβ don't cache theAskPassorAuthUserPassvalue.OpenVPN.TLSRemote=nameβ accept connections only from a host with X509 name or common name equal toname.OpenVPN.TLSAuth=fileβ usefilefor HMAC authentication.OpenVPN.TLSAuthDir=directionβ usedirectionfor HMAC authentication direction.OpenVPN.Cipher=cipherβ usecipheras the cipher.OpenVPN.Auth=true | falseβ use HMAC authentication.OpenVPN.CompLZO=yes | no | adaptiveβ use fast LZO compression.OpenVPN.RemoteCertTls=client | serverβ require that the remote certificate is signed based on RFC3280 TLS rules.OpenVPN.ConfigFile=fileβ OpenVPN config file for extra options that the OpenVPN plugin doesn't support.OpenVPN.DeviceType=tun|tapβ whether the VPN should use atun(OSI layer 3) ortap(OSI layer 2) device. defaults totunif you omit it.
π VPNC π
this key is mandatory for vpnc(8) networks:
VPNC.IPSec.ID=idβ group username.
and these keys are optional for vpnc(8) networks:
VPNC.IPSec.Secret=secretβ group password.VPNC.XAuth.Username=usernameβ username.VPNC.XAuth.Password=passwordβ password.VPNC.IKE.Authmode=modeβ IKE authentication mode.VPNC.IKE.DHGroup=groupβ IKE DH group name.VPNC.PFS=groupβ Diffie-Hellman group for perfect forward secrecy.VPNC.Domain=domainβ domain name for authentication.VPNC.Vendor=vendorβ vendor of the IPSec gateway.VPNC.LocalPort=portβ local ISAKMP port number to use.VPNC.CiscoPort=portβ Cisco UDP Encapsulation Port.VPNC.AppVersion=versionβ application version to report.VPNC.NATTMode=modeβ NAT-Traversal Method to use.VPNC.DPDTimeout=timeoutβ DPD idle timeout.VPNC.SingleDES=true | falseβ enable single DES encryption.VPNC.NoEncryption=true | falseβ enable usage of no encryption for data traffic.VPNC.DeviceType=tun|tapβ whether the VPN should use atun(OSI layer 3) ortap(OSI layer 2) device. defaults totunif you omit it.
π L2TP π
these keys are optional for l2tp (xl2tp.conf(5), pppd(8)) networks:
L2TP.User=userβ L2TP username.L2TP.Password=passwordβ L2TP password.L2TP.BPS=bpsβ max bandwidth to use.L2TP.TXBPS=bpsβ max transmit bandwidth to use.L2TP.RXBPS=bpsβ max receive bandwidth to use.L2TP.LengthBit=yes | noβ use length bit.L2TP.Challenge=yes | noβ use challenge authentication.L2TP.DefaultRoute=routeβ add route to the routing tables.L2TP.FlowBit=yes | noβ use seq numbers.L2TP.TunnelRWS=sizeβ window size.L2TP.Exclusive=yes | noβ use only one control channel.L2TP.Redial=yes | noβ redial if disconnected.L2TP.RedialTimeout=timeoutβ redial timeout.L2TP.MaxRedials=countβ maximum amount of redial tries.L2TP.RequirePAP=yes | noβ require PAP.L2TP.RequireCHAP=yes | noβ require CHAP.L2TP.ReqAuth=yes | noβ require authentication.L2TP.AccessControl=yes | noβ use access control.L2TP.AuthFile=fileβ authentication file location.L2TP.ListenAddr=addressβ listen address.L2TP.IPSecSaref=yes | noβ listen address.L2TP.Port=portβ UDP port used.PPPD.EchoFailure=countβ echo failure count.PPPD.EchoFailure=countβ dead peer check count.PPPD.EchoInterval=intervalβ dead peer check interval.PPPD.Debug=levelβ debug level.PPPD.RefuseEAP=true | falseβ refuse EAP authentication.PPPD.RefusePAP=true | falseβ refuse PAP authentication.PPPD.RefuseCHAP=true | falseβ refuse CHAP authentication.PPPD.RefuseMSCHAP=true | falseβ refuse MSCHAP authentication.PPPD.RefuseMSCHAP2=true | falseβ refuse MSCHAPv2 authentication.PPPD.NoBSDComp=true | falseβ disable BSD compression.PPPD.NoPcomp=true | falseβ disable protocol compression.PPPD.UseAccomp=true | falseβ disable Access/Control compression.PPPD.NoDeflate=true | falseβ disable deflate compression.PPPD.ReqMPPE=true | falseβ require the use of MPPE.PPPD.ReqMPPE40=true | falseβ require the use of MPPE 40 bit.PPPD.ReqMPPE128=true | falseβ require the use of MPPE 128 bit.PPPD.ReqMPPEStateful=true | falseβ allow MPPE to use stateful mode.PPPD.NoVJ=true | falseβ no Van Jacobson compression.
π¦ PPTP π¦
these keys are optional for pptp(8) networks (see also pppd(8)):
PPTP.User=usernameβ username.PPTP.Password=passwordβ password.PPPD.EchoFailure=countβ echo failure count.PPPD.EchoFailure=countβ dead peer check count.PPPD.EchoInterval=intervalβ dead peer check interval.PPPD.Debug=levelβ debug level.PPPD.RefuseEAP=true | falseβ refuse EAP authentication.PPPD.RefusePAP=true | falseβ refuse PAP authentication.PPPD.RefuseCHAP=true | falseβ refuse CHAP authentication.PPPD.RefuseMSCHAP=true | falseβ refuse MSCHAP authentication.PPPD.RefuseMSCHAP2=true | falseβ refuse MSCHAPv2 authentication.PPPD.NoBSDComp=true | falseβ disable BSD compression.PPPD.NoPcomp=true | falseβ disable protocol compression.PPPD.UseAccomp=true | falseβ disable Access/Control compression.PPPD.NoDeflate=true | falseβ disable deflate compression.PPPD.ReqMPPE=true | falseβ require the use of MPPE.PPPD.ReqMPPE40=true | falseβ require the use of MPPE 40 bit.PPPD.ReqMPPE128=true | falseβ require the use of MPPE 128 bit.PPPD.ReqMPPEStateful=true | falseβ allow MPPE to use stateful mode.PPPD.NoVJ=true | falseβ no Van Jacobson compression.
okay bestie that's a lot of keys, and we're not even done yet β part 2 is coming, don't go anywhere πβ¨
π EXAMPLE π
ok so bestie, picture this: you're setting up a VPN that's doing the absolute most β it's serving L2TP, OpenVPN and OpenConnect all at once. main character energy fr. That config could live in a file like /var/lib/connman-vpn/example.config, and it looks like this:
[global]
Name = Example
Description = Example VPN configuration
[provider_l2tp]
Type = L2TP
Name = Connection to corporate network
Host = 1.2.3.4
Domain = corporate.com
Networks = 10.10.30.0/24
L2TP.User = username
[provider_openconnect]
Type = OpenConnect
Name = Connection to corporate network using Cisco VPN
Host = 7.6.5.4
Domain = corporate.com
Networks = 10.10.20.0/255.255.255.0/10.20.1.5,192.168.99.1/24,2001:db8::1/64
OpenConnect.ServerCert = 263AFAB4CB2E6621D12E90182008AEF44AEFA031
OpenConnect.CACert = /etc/certs/certificate.p12
[provider_openvpn]
Type = OpenVPN
Name = Connection to corporate network using OpenVPN
Host = 3.2.5.6
Domain = my.home.network
OpenVPN.CACert = /etc/certs/cacert.pem
OpenVPN.Cert = /etc/certs/cert.pem
OpenVPN.Key = /etc/certs/cert.key
likeβ¦ three whole providers in one file?? she's booked and busy π
Notice the [global] block is just vibing up top with the Name and Description, and then each [provider_...] section gets its own Type, Name, Host, Domain and all the cert/networks deets that go with it. And yes, that Networks line in [provider_openconnect] is doing the absolute most β three different notations separated by commas, one of them IPv6. iconic. β¨
π¦ SEE ALSO π¦
and that's the whole page bestie!! π this one is connection_name.config(5), dated 2015-10-15 β so like, vintage, but in a cute way π go forth and configure, you've got this π«Ά
π¦ where this page comes from
- alpine 3.24: connman-doc 2.0-r0 Β· GPL-2.0-only
- arch rolling: connman 2.0-1 Β· GPL-2.0-only
- debian bookworm: connman 1.41-3 Β· GPL-2.0-only
- debian trixie: connman 1.44-3 Β· GPL-2.0-only
- nixos 26.05: connman 1.43
- nixpkgs unstable: connman 1.43
- opensuse-leap 16.0: connman-doc 1.42-bp160.1.40 Β· GPL-2.0-only
- opensuse-leap 16.0: connman-doc 1.42-bp160.1.40 Β· GPL-2.0-only
- opensuse-leap 16.0: connman-doc 1.42-bp160.1.40 Β· GPL-2.0-only
- ubuntu noble: connman 1.42-5build3 Β· GPL-2.0-only
- ubuntu questing: connman 1.44-3
- ubuntu resolute: connman 1.45-3 Β· GPL-2.0-only
- ubuntu stonking: connman 2.0-2 Β· GPL-2.0-only
- Copyright (C) 2015 Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms