找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 12654|回复: 6

[脚本] 使用 RouterOS 建立基于 L2TP over IPsec 的 VPN 服务

[复制链接]
发表于 2019-10-13 16:03:41 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
配置 IPsec
secret 参数是您的预共享秘钥,enc-algorithm 参数请选择您设备支持的加密方式,不知道就别改,可选参数为 3des,aes-128,aes-192,aes-256

/ip ipsec peer \
add address=0.0.0.0/0 auth-method=pre-shared-key dh-group=modp1024 \
disabled=no dpd-interval=2 dpd-maximum-failures=5 enc-algorithm=3des \
exchange-mode=main-l2tp generate-policy=port-override hash-algorithm=sha1 \
lifetime=1d nat-traversal=yes port=500 secret=123 send-initial-contact=yes
/ip ipsec proposal \
set default enc-algorithms=3des auth-algorithms=sha1 disabled=no \
lifetime=30m pfs-group=modp1024

上面的配置在routeros 6.45 里面怎么写?帮忙修改下!!谢谢
routeros
发表于 2019-10-13 18:02:06 | 显示全部楼层
再买一个 rb路由器吧。
用sstp, 默认"不认证",输个ip,建个用户名就通了
好处是 端口随你选。
routeros
回复

使用道具 举报

发表于 2019-10-13 21:45:15 | 显示全部楼层
/ip ipsec peer
add name=l2tp passive=yes

/ip ipsec profile
set [find default=yes] dh-group=modp1024 enc-algorithm=3des hash-algorithm=sha1

/ip ipsec proposal
set [find default=yes] pfs-group=modp1024 enc-algorithms=3des auth-algorithms=sha1

/ip ipsec identity
add generate-policy=port-strict peer=l2tp remote-id=ignore secret=123

点评

一目了然  发表于 2019-10-16 11:26
routeros
回复

使用道具 举报

发表于 2019-10-18 13:57:40 | 显示全部楼层
都是高手呀,我也想在内网搭个VPN用,没搭过
routeros
回复

使用道具 举报

发表于 2019-11-5 10:14:08 | 显示全部楼层
都是高高手啊,学习中
routeros
回复

使用道具 举报

发表于 2020-1-12 21:35:59 | 显示全部楼层
都是高手呀,我也想在内网搭个VPN用,没搭过
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-4-19 13:39 , Processed in 0.052209 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表