V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
Leo5117
V2EX  ›  OpenWrt

OpenWRT 中用 Hotplug iface 实现自动拨号连接

  •  1
     
  •   Leo5117 · 2020-04-15 16:12:39 +08:00 · 360 次点击
    这是一个创建于 1538 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如题我想请教大家,如何通过 hotplug iface 实现当 wan 口已经连接的状态下实现 ipsec 的自动拨号脚本。
    ipsec 的执行命令如下,如能赐教不甚感谢!!!

    /etc/init.d/ipsec enable
    /etc/init.d/xl2tpd enable
    /etc/init.d/ipsec restart
    /etc/init.d/xl2tpd restart
    ipsec restart
    ipsec up L2TP-PSK
    ipsec statusall
    echo "c strong-vpn" > /var/run/xl2tpd/l2tp-control
    1 条回复    2020-05-01 14:58:46 +08:00
    zro
        1
    zro  
       2020-05-01 14:58:46 +08:00
    脚本加去 firewall.usr 那应该也可以的,wan 口重连 Firewall 会 reload 的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   975 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:05 · PVG 05:05 · LAX 14:05 · JFK 17:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.