openvpn3-service-netcfg(8)
β¨ openvpn3-service-netcfg β bestie edition β¨
okay so you're here for openvpn3-service-netcfg(8), the OpenVPN 3 Linux Network Configuration Service, and honestly? she's the backbone of the whole VPN networking situation. let's get into it π
πΈ NAME πΈ
openvpn3-service-netcfg β the OpenVPN 3 Linux Network Configuration Service. that's her. that's the whole name. π
π SYNOPSIS π
openvpn3-service-netcfg [OPTIONS]
openvpn3-service-netcfg -h | --help
π¦ DESCRIPTION π¦
so openvpn3-service-netcfg is a backend service for OpenVPN 3 Linux, and her whole job is creating and managing virtual network interfaces, plus all the routing and DNS configuration that your VPN connections hand over. she's not out here doing small talk β she's doing infrastructure.
she gets started automatically when openvpn3-service-client starts and begins configuring a virtual network interface for its session. like, you don't have to text her first, she already knows. π«
π¨ important: only one network configuration service can run on the system. just one. no duplicates, no clones, no "but I want two". the vibes must remain singular.
normally she's launched automatically when needed, through the net.openvpn.v3.netcfg.service auto-start configuration handled by dbus-daemon(1) β but you can also start her manually from the command line. she's flexible like that.
this service must start as root. literally must. but the second she's requested the privileges she needs for her operations, she drops the rest of those privileges and switches over to the _openvpn user. very "I got what I came for, I'm leaving" energy. π
β οΈ also beware: if you change this to another user account, you also have to update the D-Bus policy too. you can't just swap it and walk away, bestie. that's not how this works.
π₯ OPTIONS π₯
-h,--helpβ prints usage and help details straight to your terminal. your little "what do I do" lifeline. π«Ά--versionβ prints the version of the program and then exits. short, sweet, gone.--log-level LEVELβ sets the default log verbosity for log events this service generates. default is4. valid values go from0to6. higher log levels = more verbose logs, and log level6contains all the debug log events, every last one, no crumbs left behind. π--log-file LOG_DESTINATIONβ by default, logging goes through theopenvpn3-service-logservice. but if you pass this argument, logging will also be sent toLOG_DESTINATION, which can be either a filename orstdout:β and that second one sends the log data to the console. double logging, double the receipts.--colourβ adds colours to log events when you're logging to a file or the terminal. events get coloured based on the log level of the event. cute and functional, we love to see it π--idle-exit MINUTESβ theopenvpn3-service-netcfgservice will exit automatically if she's been idle forMINUTESminutes. and by "idle" we mean: no active virtual network interfaces are being managed by this service. she's not just sitting there scrolling, she's genuinely got nothing to do.--redirect-method METHODβ this defines how route configurations get handled when they involve changing the default gateway. primarily it controls how network traffic routing happens from the VPN client process to the remote server. validMETHODarguments:host-route(default) β adds an explicit direct host route for the VPN server's IP address to go via the default gateway on the system. this is a lot like how OpenVPN 2.x behaves. classic behavior, classic girl. πbind-deviceβ binds the device using theSO_BINDDEVsocket option on the UDP/TCP socket used to connect to the remote side.noneβ disables any specific routing arrangement for the remote host access. and look, if the default gateway gets modified, this will most certainly make the VPN connection useless. so this is not recommended for production. not even a little. π
--set-somark MARKβ adds anSO_MARKbased reference to the packets sent to the remote server. netfilters can use this, like the--markfeature iniptables. works on its own or in combination with any--redirect-methodsettings β unlessopenvpn3-service-clientis started with--disable-protect-socket. read that again, it's a real condition. β¨--state-dir DIRECTORYβ defines a directory whereopenvpn3-service-netcfgwill read configuration data from. this config file is JSON based and will override the options from the command line. yes, it really does override. the file said what it said.
π§ DNS Resolver Configuration π§
the openvpn3-service-netcfg service can configure the DNS resolver based on whatever the running VPN sessions got pushed from the OpenVPN servers. she supports multiple approaches β but only one of them can be enabled. pick your fighter, not both. π
--resolv-conf RESOLV-CONF-FILEβ this method modifies the providedRESOLV-CONF-FILEdirectly. the file typically points at/etc/resolv.conf. but beware, bestie: this approach may not be fail-safe in all scenarios, and other network services may overwrite the changes OpenVPN applied, or OpenVPN may overwrite changes outside of its control. it's giving chaos, lowkey.
OpenVPN keeps a backup file when it has modified it, and will automatically restore the content when no running OpenVPN sessions have received any DNS configurations. so she does clean up after herself. π«Ά
--systemd-resolvedβ enables integration with thesystemd-resolved(8)service. the system must be pre-configured to use this service for OpenVPN's changes to fully take effect. this is the preferred way, because the DNS resolver settings are fully managed bysystemd-resolved(8). and this approach will currently enable split-DNS by default. icon behavior, honestly. π
π Configuration file π
the default location for the configuration file is under /var/lib/openvpn3. it's a plain JSON configuration file and it only considers a few fields:
{
"log_level": LEVEL,
"log_file": FILENAME,
"idle_exit": MINUTES,
"resolv_conf_file": FILENAME,
"systemd_resolved": "",
"redirect_method": ["host-route" | "bind-device" | "none" ],
"set_somark": MARK
}
only the settings you actually use need to be present. and if something isn't set there, the command line options are able to set those options instead. teamwork! π€
β Attribute: log_level β
this is the equivalent of the --log-level command line argument. valid LEVEL values are 0 to 6. same rules, different address.
β Attribute: log_file β
this is the equivalent of the --log-file command line argument. it must be a filename where to write log files. it also supports stdout: to write log data to the console/tty. and heads up: logging will also be sent to the openvpn3-service-log(8) service regardless of this setting. no escaping the log service, she's always invited. β¨
β Attribute: idle_exit β
this is the equivalent of the --idle-exit command line argument. this overrides the default automatic exit logic. the argument it takes is a positive integer β how many minutes it'll be allowed to run idle, not managing any OpenVPN network devices, before it shuts down automatically. clock's ticking π
β Attribute: resolv_conf_file β
this is used to enable the resolv.conf DNS resolver configuration integration. see --resolv-conf for the details.
β Attribute: systemd_resolved β
this is used to enable the systemd-resolved(8) DNS resolver configuration integration. see --systemd-resolved for the details.
β Attribute: redirect_method β
this is the equivalent of the --redirect-method option. see that option for the details. no need to make me repeat myself, bestie, I already spilled. π
β Attribute: set_somark β
this is the equivalent of --set-somark. see that option for the details.
π SEE ALSO π
and that's the whole page, bestie. this whole thing comes to you from OpenVPN 3 Linux β openvpn3-service-netcfg(8), periodt. go configure something responsibly πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: openvpn3-client 27.1+dfsg-2ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms