connection_name.config(5)

πŸ“¦
version 2.0 Β· 2 versions
  • 2.0 Β· alpine 3.24, arch rolling, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.36 Β· ubuntu jammy
, in alpine 3.24, arch rolling, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 β€” request mtu from 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.
if OpenConnect.Cookie, OpenConnect.VPNHost or OpenConnect.ServerCert are 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, either client or server.
  • OpenVPN.Proto=protocol β€” use protocol.
  • OpenVPN.Port=port β€” TCP/UDP port number.
  • OpenVPN.AuthUserPass=true | false β€” authenticate on the server using username/password.
  • OpenVPN.AskPass=file β€” get certificate password from file.
  • OpenVPN.AuthNoCache=true | false β€” don't cache the AskPass or AuthUserPass value.
  • OpenVPN.TLSRemote=name β€” accept connections only from a host with X509 name or common name equal to name.
  • OpenVPN.TLSAuth=file β€” use file for HMAC authentication.
  • OpenVPN.TLSAuthDir=direction β€” use direction for HMAC authentication direction.
  • OpenVPN.Cipher=cipher β€” use cipher as 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 a tun (OSI layer 3) or tap (OSI layer 2) device. defaults to tun if 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 a tun (OSI layer 3) or tap (OSI layer 2) device. defaults to tun if 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 🫢