OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Complete the First 30 Minutes After Installation
        • Check Hardware Compatibility Before Installing
        • Bootstrap Wi-Fi Firmware Without Ethernet
        • Set Up OpenBSD as a Laptop or Workstation
        • Configure Laptop Power Management
        • Run OpenBSD as a Virtual Machine Guest
        • Install OpenBSD on a VPS or Cloud Server
        • Install OpenBSD with Full-Disk Encryption
        • Troubleshoot Web Browsers on OpenBSD
        • Create an Administrator Account with doas and SSH Keys
        • Establish a Conservative Security Baseline
        • Manage OpenBSD with Ansible
        • Recover Access and Reset the Root Password
        • Collect OpenBSD Diagnostic Evidence
        • Configure Secure Remote Access with OpenSSH
        • Set Up WordPress on OpenBSD
        • Build Third-Party Software from Ports
        • Use FIDO Security Keys with OpenSSH
        • Build OpenBSD from Source
        • Configure Wi-Fi Roaming and Wired Failover
        • Dual-Boot OpenBSD on a UEFI System
        • Troubleshoot PF, NAT, and Routing
        • Automate OpenBSD Installation with Autoinstall and PXE
        • Route Multiple VLANs with PF
        • Configure a Road-Warrior WireGuard VPN
        • Troubleshoot Package Installation and Update Failures
        • Route IPv6 Networks without NAT
        • Schedule Recurring Maintenance
        • Plan a Docker Workload Migration to OpenBSD
        • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Build a Simple Router and Firewall
        • Monitor an OpenBSD System
        • Back Up and Restore an OpenBSD System
        • Configure softraid RAID1
        • Recover an OpenBSD System That Does Not Boot
        • Install Z shell (zsh)
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Architectures
      • OpenBSD Package Search

        xl2tpd-1.3.15p0

        Package search / Categories / Current snapshot
        โ† Back to search
        OpenBSD branch
        OpenBSD 8.0 releaseCurrent snapshot

        Current snapshot ยท amd64

        l2tp client/server

        Project homepage: https://github.com/xelerance/xl2tpd

        Description

        xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661), which works by opening a pseudo-tty for communicating with pppd. L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP servers. Another important application is Virtual Private Networks where the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec, RFC 3193).

        Package information

        Ports path
        net/xl2tpd
        Package architecture
        amd64
        Maintainer
        Alexander Naumov <alexander_naumov@opensuse.org>
        Categories
        net
        Available flavors
        None listed

        Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.

        Direct dependencies

        None listed.

        OpenBSD README

        This README contains unresolved ports variables; replace them before using its commands.

        +-----------------------------------------------------------------------
        | Running xl2tpd on OpenBSD
        +-----------------------------------------------------------------------
        
        Note that this port is not fully operational. It is useful in some cases,
        but in general for situations supported by npppd(8) from OpenBSD's base
        system (for example LNS "server" use), it is strongly recommended to use
        that option instead.
        
        As of this time, npppd(8) does not support client-side operations (LAC),
        so this port is useful there.
        
        Basic operation
        ===============
        xl2tpd makes a connection via L2TP, but uses pppd(8) to carry out most
        operations; therefore most PPP-related configuration is done via pppd's
        configuration files; for an example of how to configure this, see
        ${TRUEPREFIX}/share/examples/xl2tpd/ppp-options.xl2tpd.
        
        You will also need to add the _xl2tpd user to the group 'network' in
        /etc/group in order to allow it to start pppd.
        
        Control mechanisms
        ==================
        When xl2tpd is started, it does not automatically connect. Instead it is
        controlled by writing simple commands to a fifo (you may be familiar with
        this style from isakmpd), e.g.:
        
          echo '[command] [config_name]' > /var/run/xl2tpd/l2tp-control
        
        Where [command] is one of:
        
          c    connect; may be followed by authname and password
          d    disconnect
          r    (disconnect and) remove
        
        To connect, you must ensure that a free ppp(4) interface is available
        ("ifconfig ppp0 up" or "echo up > /etc/hostname.ppp0"), and then you must
        send the 'c'onnect command to actually bring up a session; this does not
        happen automatically.
        
        An xl2tpd-control program is also available and you might be able to use
        it as an alternative to the above, but it has some issues.
        
        L2TP+IPsec
        ==========
        To use an IPsec-protected tunnel, as you might want to do if connecting to
        an npppd server, the IPsec tunnel must be configured separately using
        isakmpd(8) - here are sample config sections (adjust $server, $ipsec_psk,
        etc. as necessary, and you may need to adjust the auth/enc/group settings):
        
        - /etc/ipsec.conf
        
        ike dynamic esp transport proto udp from egress to $server port 1701 \
            main auth "hmac-sha" enc "aes" group modp2048 \
            quick auth "hmac-sha" enc "aes" \
            psk $ipsec_psk
        
        - ${SYSCONFDIR}/xl2tpd/xl2tpd.conf:
        
        [global]
        debug avp = yes
        debug network = yes
        debug state = yes
        debug tunnel = yes
        port = 1701
        
        [lac l2tp]
        lns = $server
        ppp debug = yes
        pppoptfile = /etc/ppp/options.l2tp
        
        - /etc/ppp/options.l2tp:
        
        ipcp-accept-local
        ipcp-accept-remote
        noccp
        noauth
        mtu 1456
        mru 1456
        debug
        lock
        user $username
        netmask 255.255.255.255
        
        - /etc/ppp/chap-secrets:
        
        $username	*	$password		*
        
        Enable/start isakmpd:
        
        # rcctl enable isakmpd
        # rcctl set isakmpd flags -Kv
        # rcctl start isakmpd
        # ipsecctl -vf /etc/ipsec.conf
        
        And confirm that the tunnel does actually come up:
        
        # ipsecctl -sa
        FLOWS:
        flow esp in proto udp from $server port l2tp to $me peer $server \
        srcid $myhostname dstid $server/32 type use
        flow esp out proto udp from $me to $server port l2tp peer $server \
        srcid $myhostname dstid $server/32 type require
        
        SAD:
        esp transport from $me to $server spi 0x1037c0f2 auth hmac-sha1 enc aes
        esp transport from $server to $me spi 0x6c3d9e6a auth hmac-sha1 enc aes
        
        If that is successful, you can try to make the L2TP connection:
        
        # ifconfig ppp0 up
        # rcctl start xl2tpd
        # tail -f /var/log/daemon &
        # echo c l2tp > /var/run/xl2tpd/l2tp-control
        
        If all is well, you'll see debug output in the log, and the interface
        should be connected:
        
        # ifconfig ppp
        ppp0: flags=28051<UP,POINTOPOINT,RUNNING,MULTICAST,NOINET6> mtu 1456
        	priority: 0
        	groups: ppp
        	inet 172.28.15.223 --> 172.28.15.1 netmask 0xffffffff
        

        Package guides

        • Installing and updating packages

        Package details as JSON

        Report a bug