跳到主要内容

strongSwan

Route-based VPNs

# iproute2
# ip link add <name> type xfrm dev <underlying interface> if_id <interface ID>
# strongSwan 工具
# /usr/local/libexec/ipsec/xfrmi --name <name> --id <interface ID> --dev <underlying interface>
# <interface ID> 32位整数,使用 0x 十六进制表示
# <underlying interface> 目前无意义 - 除非需要配置流出策略

ip link add ipsec0 type xfrm dev eth0 if_id 42

# 统计信息
ip -s link show eth0