The Linux Kernel Logo
  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs
  • Core API
  • Driver APIs
  • Subsystems
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
        • AF_XDP
        • Bare UDP Tunnelling Module Documentation
        • batman-adv
        • SocketCAN - Controller Area Network
        • The UCAN Protocol
        • Hardware Device Drivers
        • Networking Diagnostics
        • Distributed Switch Architecture
        • Linux Devlink Documentation
        • CAIF
        • Netlink interface for ethtool
        • IEEE 802.15.4 Developer’s Guide
        • ISO 15765-2 (ISO-TP)
        • J1939 Documentation
        • Linux Networking and Network Devices APIs
        • MSG_ZEROCOPY
        • FAILOVER
        • Net DIM - Generic Network Dynamic Interrupt Moderation
        • NET_FAILOVER
        • Page Pool API
        • PHY Abstraction Layer
        • phylink
        • IP-Aliasing
        • Ethernet Bridging
        • SNMP counter
        • Checksum Offloads
        • Segmentation Offloads
        • Scaling in the Linux Networking Stack
        • Kernel TLS
        • Kernel TLS offload
        • In-Kernel TLS Handshake
        • Linux NFC subsystem
        • Netdev private dataroom for 6lowpan interfaces
        • 6pack Protocol
        • ARCnet Hardware
        • ARCnet
        • ATM
        • AX.25
        • Linux Ethernet Bonding Driver HOWTO
        • cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
        • DCTCP (DataCenter TCP)
        • Device Memory TCP
        • DNS Resolver Module
        • Softnet Driver Issues
        • EQL Driver: Serial IP Load Balancing HOWTO
        • LC-trie implementation notes
        • Linux Socket Filtering aka Berkeley Packet Filter (BPF)
        • Generic HDLC layer
        • Generic Netlink
        • Netlink Family Specifications
          • Family conntrack netlink specification
          • Family devlink netlink specification
          • Family dpll netlink specification
          • Family ethtool netlink specification
          • Family fou netlink specification
          • Family handshake netlink specification
          • Family lockd netlink specification
          • Family mptcp_pm netlink specification
          • Family net-shaper netlink specification
          • Family netdev netlink specification
          • Family nfsd netlink specification
          • Family nftables netlink specification
          • Family nl80211 netlink specification
          • Family nlctrl netlink specification
          • Family ovpn netlink specification
            • Summary
            • Operations
              • peer-new
              • peer-set
              • peer-get
              • peer-del
              • peer-del-ntf
              • key-new
              • key-get
              • key-swap
              • key-swap-ntf
              • key-del
            • Multicast groups
            • Definitions
              • nonce-tail-size
              • cipher-alg
              • del-peer-reason
              • key-slot
            • Attribute sets
              • peer
                • id (u32)
                • remote-ipv4 (u32)
                • remote-ipv6 (binary)
                • remote-ipv6-scope-id (u32)
                • remote-port (u16)
                • socket (u32)
                • socket-netnsid (s32)
                • vpn-ipv4 (u32)
                • vpn-ipv6 (binary)
                • local-ipv4 (u32)
                • local-ipv6 (binary)
                • local-port (u16)
                • keepalive-interval (u32)
                • keepalive-timeout (u32)
                • del-reason (u32)
                • vpn-rx-bytes (uint)
                • vpn-tx-bytes (uint)
                • vpn-rx-packets (uint)
                • vpn-tx-packets (uint)
                • link-rx-bytes (uint)
                • link-tx-bytes (uint)
                • link-rx-packets (uint)
                • link-tx-packets (uint)
              • keyconf
                • peer-id (u32)
                • slot (u32)
                • key-id (u32)
                • cipher-alg (u32)
                • encrypt-dir (nest)
                • decrypt-dir (nest)
              • keydir
                • cipher-key (binary)
                • nonce-tail (binary)
              • ovpn
                • ifindex (u32)
                • peer (nest)
                • keyconf (nest)
          • Family ovs_datapath netlink specification
          • Family ovs_flow netlink specification
          • Family ovs_vport netlink specification
          • Family rt-addr netlink specification
          • Family rt-link netlink specification
          • Family rt-neigh netlink specification
          • Family rt-route netlink specification
          • Family rt-rule netlink specification
          • Family tc netlink specification
          • Family tcp_metrics netlink specification
          • Family team netlink specification
        • Generic networking statistics for netlink users
        • The Linux kernel GTP tunneling module
        • Identifier Locator Addressing (ILA)
        • IOAM6 Sysfs variables
        • io_uring zero copy Rx
        • IP dynamic address hack-port v0.03
        • IPsec
        • IP Sysctl
        • IPv6
        • IPVLAN Driver HOWTO
        • IPvs-sysctl
        • Kernel Connection Multiplexor
        • L2TP
        • The Linux LAPB Module Interface
        • How to use packet injection with mac80211
        • Management Component Transport Protocol (MCTP)
        • MPLS Sysfs variables
        • Multipath TCP (MPTCP)
        • MPTCP Sysfs variables
        • HOWTO for multiqueue network device support
        • Multi-PF Netdev
        • NAPI
        • Common Networking Struct Cachelines
        • Netconsole
        • Netdev features mess and how to get out from it alive
        • Network Devices, the Kernel, and You!
        • Netfilter Sysfs variables
        • NETIF Msg Level
        • Netmem Support for Network Drivers
        • Resilient Next-hop Groups
        • Netfilter Conntrack Sysfs variables
        • Netfilter’s flowtable infrastructure
        • OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface (TC6) Framework Support
        • Open vSwitch datapath developer documentation
        • Operational States
        • Packet MMAP
        • Linux Phonet protocol family
        • PHY link topology
        • HOWTO for the linux packet generator
        • PLIP: The Parallel Line Internet Protocol Device
        • PPP Generic Driver and Channel Interface
        • The proc/net/tcp and proc/net/tcp6 variables
        • Power Sourcing Equipment (PSE) Documentation
        • How to use radiotap headers
        • RDS
        • Linux wireless regulatory documentation
        • Network Function Representors
        • RxRPC Network Protocol
        • SOCKET OPTIONS
        • SECURITY
        • EXAMPLE CLIENT USAGE
        • Linux Kernel SCTP
        • LSM/SeLinux secid
        • Seg6 Sysfs variables
        • struct sk_buff
        • SMC Sysctl
        • NIC SR-IOV APIs
        • Interface statistics
        • Stream Parser (strparser)
        • Ethernet switch device driver model (switchdev)
        • Sysfs tagging
        • TC Actions - Environmental Rules
        • TC queue based filtering
        • TCP Authentication Option Linux implementation (RFC5925)
        • Thin-streams and TCP
        • Team
        • Timestamping
        • Linux Kernel TIPC
        • Transparent proxy support
        • Universal TUN/TAP device driver
        • The UDP-Lite protocol (RFC 3828)
        • Virtual Routing and Forwarding (VRF)
        • Virtual eXtensible Local Area Networking documentation
        • Linux X.25 Project
        • X.25 Device Driver Interface
        • XFRM device - offloading the IPsec computations
        • XFRM proc - /proc/net/xfrm_* files
        • XFRM
        • XFRM Syscall
        • XDP RX Metadata
        • AF_XDP TX Metadata
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • Storage interfaces
    • Other subsystems
  • Locking
  • Licensing rules
  • Writing documentation
  • Development tools
  • Testing guide
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust
  • Administration
  • Build system
  • Reporting issues
  • Userspace tools
  • Userspace API
  • Firmware
  • Firmware and Devicetree
  • CPU architectures
  • Unsorted documentation
  • Translations
The Linux Kernel
  • Kernel subsystem documentation
  • Networking
  • Netlink Family Specifications
  • Family ovpn netlink specification
  • View page source

Family ovpn netlink specification¶

Contents

  • Family ovpn netlink specification

    • Summary

    • Operations

      • peer-new

      • peer-set

      • peer-get

      • peer-del

      • peer-del-ntf

      • key-new

      • key-get

      • key-swap

      • key-swap-ntf

      • key-del

    • Multicast groups

    • Definitions

      • nonce-tail-size

      • cipher-alg

      • del-peer-reason

      • key-slot

    • Attribute sets

      • peer

      • keyconf

      • keydir

      • ovpn

Summary¶

Netlink protocol to control OpenVPN network devices

Operations¶

peer-new¶

Add a remote peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-set¶

modify a remote peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-get¶

Retrieve data about existing remote peers (or a specific one)

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

reply
attributes:

[peer]

dump:
request
attributes:

[ifindex]

reply
attributes:

[peer]

peer-del¶

Delete existing remote peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-del-ntf¶

Notification about a peer being deleted

notify:

peer-get

mcgrp:

peers

key-new¶

Add a cipher key for a specific peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

key-get¶

Retrieve non-sensitive data about peer key and cipher

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

reply
attributes:

[keyconf]

key-swap¶

Swap primary and secondary session keys for a specific peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

key-swap-ntf¶

Notification about key having exhausted its IV space and requiring renegotiation

notify:

key-get

mcgrp:

peers

key-del¶

Delete cipher key for a specific peer

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

Multicast groups¶

  • peers

Definitions¶

nonce-tail-size¶

type:

const

value:

8

cipher-alg¶

type:

enum

entries:
  • none

  • aes-gcm

  • chacha20-poly1305

del-peer-reason¶

type:

enum

entries:
  • teardown

  • userspace

  • expired

  • transport-error

  • transport-disconnect

key-slot¶

type:

enum

entries:
  • primary

  • secondary

Attribute sets¶

peer¶

id (u32)¶

doc:

The unique ID of the peer in the device context. To be used to identify peers during operations for a specific device

remote-ipv4 (u32)¶

doc:

The remote IPv4 address of the peer

byte-order:

big-endian

display-hint:

ipv4

remote-ipv6 (binary)¶

doc:

The remote IPv6 address of the peer

display-hint:

ipv6

remote-ipv6-scope-id (u32)¶

doc:

The scope id of the remote IPv6 address of the peer (RFC2553)

remote-port (u16)¶

doc:

The remote port of the peer

byte-order:

big-endian

socket (u32)¶

doc:

The socket to be used to communicate with the peer

socket-netnsid (s32)¶

doc:

The ID of the netns the socket assigned to this peer lives in

vpn-ipv4 (u32)¶

doc:

The IPv4 address assigned to the peer by the server

byte-order:

big-endian

display-hint:

ipv4

vpn-ipv6 (binary)¶

doc:

The IPv6 address assigned to the peer by the server

display-hint:

ipv6

local-ipv4 (u32)¶

doc:

The local IPv4 to be used to send packets to the peer (UDP only)

byte-order:

big-endian

display-hint:

ipv4

local-ipv6 (binary)¶

doc:

The local IPv6 to be used to send packets to the peer (UDP only)

display-hint:

ipv6

local-port (u16)¶

doc:

The local port to be used to send packets to the peer (UDP only)

byte-order:

big-endian

keepalive-interval (u32)¶

doc:

The number of seconds after which a keep alive message is sent to the peer

keepalive-timeout (u32)¶

doc:

The number of seconds from the last activity after which the peer is assumed dead

del-reason (u32)¶

doc:

The reason why a peer was deleted

enum:

del-peer-reason

vpn-rx-bytes (uint)¶

doc:

Number of bytes received over the tunnel

vpn-tx-bytes (uint)¶

doc:

Number of bytes transmitted over the tunnel

vpn-rx-packets (uint)¶

doc:

Number of packets received over the tunnel

vpn-tx-packets (uint)¶

doc:

Number of packets transmitted over the tunnel

link-rx-bytes (uint)¶

doc:

Number of bytes received at the transport level

link-tx-bytes (uint)¶

doc:

Number of bytes transmitted at the transport level

link-rx-packets (uint)¶

doc:

Number of packets received at the transport level

link-tx-packets (uint)¶

doc:

Number of packets transmitted at the transport level

keyconf¶

peer-id (u32)¶

doc:

The unique ID of the peer in the device context. To be used to identify peers during key operations

slot (u32)¶

doc:

The slot where the key should be stored

enum:

key-slot

key-id (u32)¶

doc:

The unique ID of the key in the peer context. Used to fetch the correct key upon decryption

cipher-alg (u32)¶

doc:

The cipher to be used when communicating with the peer

enum:

cipher-alg

encrypt-dir (nest)¶

doc:

Key material for encrypt direction

nested-attributes:

keydir

decrypt-dir (nest)¶

doc:

Key material for decrypt direction

nested-attributes:

keydir

keydir¶

cipher-key (binary)¶

doc:

The actual key to be used by the cipher

nonce-tail (binary)¶

doc:

Random nonce to be concatenated to the packet ID, in order to obtain the actual cipher IV

ovpn¶

ifindex (u32)¶

doc:

Index of the ovpn interface to operate on

peer (nest)¶

doc:

The peer object containing the attributed of interest for the specific operation

nested-attributes:

peer

keyconf (nest)¶

doc:

Peer specific cipher configuration

nested-attributes:

keyconf

Previous Next

© Copyright The kernel development community.

Built with Sphinx using a theme provided by Read the Docs.