Skip to content

Instantly share code, notes, and snippets.

@neroanelli
neroanelli / routeros-ddns-dnspod.sh
Created January 20, 2020 14:29 — forked from shenjunru/routeros-ddns-dnspod.sh
DNSPod DDNS Updater on RouterOS
#policy: read,test
#pppoe-interface
:local pppoe "pppoe-out1"
#dnspod-token
:local token "uid,api-toekn"
#dnspod-domain
:local domain "example.com"

平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2 运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
#生成CA密钥
ipsec pki --gen --outform pem > caKey.pem
#生成CA证书
ipsec pki --self --in caKey.pem --dn "C=US, O=你的组织名字, CN=你的CA名字" --ca --outform pem > caCert.pem
#生成服务器密钥
ipsec pki --gen --outform pem > serverKey.pem