Openwrt 下 L2TP搭建

来源:互联网 发布:网络推广方式的优缺点 编辑:程序博客网 时间:2024/05/07 20:06

Openwrt 下 L2TP搭建

1. 配置文件

官网配置:https://wiki.openwrt.org/doc/uci/network

Protocol “l2tp” (PPP over L2TP Pseudowire Tunnel)

:!: The package xl2tpd must be installed to use this protocol.

Most options are similar to protocol “ppp”.

Name Type Required Default Description server string yes (none) L2TP server to connect to. Acceptable datatypes are hostname or IP address, with optional port separated by colon :. Note that specifying port is only supported recently and should appear in DD release username string no (none) Username for PAP/CHAP authentication password string yes if username is provided (none) Password for PAP/CHAP authentication ipv6 bool no 0 Enable IPv6 on the PPP link (IPv6CP) mtu int no pppd default Maximum Transmit/Receive Unit, in bytes keepalive string no (none) Number of unanswered echo requests before considering the peer dead. The interval between echo requests is 5 seconds. checkup_interval int no (none) Number of seconds to pass before checking if the interface is not up since the last setup attempt and retry(重操作) the connection otherwise. Set it to a value sufficient for a successful L2TP connection for you. It’s mainly for the case that netifd sent the connect request yet xl2tpd failed to complete it without the notice of netifd pppd_options string no (none) Additional options to pass to pppd

The name of the physical interface will be “l2tp-<logical interface name>”.

Example:

root@OpenWrt:/# cat  /etc/config/networkconfig interface 'vpn'        option proto 'l2tp'        option server '120.197.116.46'        option username 'test'        option password 'test'        option mtu '1410'        option keepalive '60'        option demand '30'root@OpenWrt:/# 

更新中……

1 0
原创粉丝点击