脚本导入证书

/system script
add dont-require-permissions=no name=script1 owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="{\r\
    \n#\C9\E8\D6\C3SSTP\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/ros.crt\" mode=http dst-path=ros.crt\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/ros.key\" mode=http dst-path=ros.key\r\
    \n:delay 3s;\r\
    \n/certificate import file-name=ros.crt passphrase=\"\"\r\
    \n/certificate import file-name=ros.key passphrase=\"\"\r\
    \n:delay 1s;\r\
    \n/interface sstp-server server set port=4433 certificate=ros.crt_0 default-profile=vpn enabled=yes\r\
    \n:delay 3s;\r\
    \n/file remove numbers=ros.crt\r\
    \n/file remove numbers=ros.key\r\
    \n\r\
    \n\r\
    \n#\C9\E8\D6\C3OVPN\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/root-ca.crt\" mode=http dst-path=root-ca.crt\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/root-ca.key\" mode=http dst-path=root-ca.key\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/server.crt\" mode=http dst-path=server.crt\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/server.key\" mode=http dst-path=server.key\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/client.crt\" mode=http dst-path=client.crt\r\
    \n/tool fetch url=\"http://ros.vpn.com/ca/client.key\" mode=http dst-path=client.key\r\
    \n:delay 3s;\r\
    \n/certificate import file-name=root-ca.crt passphrase=12345678\r\
    \n/certificate import file-name=root-ca.key passphrase=12345678\r\
    \n/certificate import file-name=server.crt passphrase=12345678\r\
    \n/certificate import file-name=server.key passphrase=12345678\r\
    \n/certificate import file-name=client.crt passphrase=12345678\r\
    \n/certificate import file-name=client.key passphrase=12345678\r\
    \n/interface ovpn-server server\r\
    \nset certificate=server.crt_0 cipher=blowfish128,aes128,aes192,aes256 default-profile=vpn enabled=yes require-client-certificate=yes\r\
    \n:delay 3s;\r\
    \n/file remove numbers=root-ca.crt\r\
    \n/file remove numbers=root-ca.key\r\
    \n/file remove numbers=server.crt\r\
    \n/file remove numbers=server.key\r\
    \n/file remove numbers=client.crt\r\
    \n/file remove numbers=client.key\r\
    \n}\r\
    \n"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值