l2tp pptp相关的一些记录

本文介绍如何通过修改配置文件来调整L2TP/IPSec连接的参数,包括添加用户名和密码、设置Dead Peer Detection(DPD)的延迟和超时时间等。这些设置能够帮助提高连接稳定性和安全性。

添加用户名和密码

echo "user l2tpd password *">>/etc/ppp/chap-secrets

/etc/ipsec.conf

  dpddelay=30
  dpdtimeout=120

改为

  dpddelay=5
  dpdtimeout=5

http://linux.die.net/man/5/ipsec.conf
dpddelay Set the delay (in seconds) between Dead Peer Dectection (RFC 3706) keepalives (R_U_THERE, R_U_THERE_ACK) that are sent for this connection。

dpdtimeout Set the length of time (in seconds) we will idle without hearing either an R_U_THERE poll from our peer, or an R_U_THERE_ACK reply.

dpdaction :When a DPD enabled peer is declared dead, what action should be taken. hold (default) means the eroute will be put into %hold status, while clear means the eroute and SA with both be cleared. restart means the the SA will immediately be renegotiated, and restart_by_peer means that ALL SA's to the dead peer will renegotiated.

dpdaction=clear is really only useful on the server of a Road Warrior config.

/etc/ipsec.secrets

/etc/init.d/xl2tpd restart

service xl2tpd status

转载于:https://www.cnblogs.com/xiangnan/p/9434389.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值