Files
l2tp-over-wireguard/off-site/scripts/create-l2tp
2026-01-13 13:47:34 -05:00

14 lines
535 B
Bash

#!/bin/sh
# This script creates an L2TP tunnel and session, then adds the L2TP interface to bridge0
# Create tunnel and session
ip l2tp add tunnel tunnel_id 123456 peer_tunnel_id 123456 remote 200.1.0.3 local 200.1.0.4 encap ip
ip l2tp add session tunnel_id 123456 session_id 789 peer_session_id 789
# Change address to not conflict with l2tp interface of other wireguard peer
ip link set l2tpeth0 address ea:b1:1b:99:1b:a9
# Bridge physical interface with L2TP interface
ip link set l2tpeth0 master bridge0
ip link set l2tpeth0 up