時隔 10 年發現 Key 過期了, 所以跑回來加一下 Updater Key 的資訊
安裝 easy-rsa 套件
$ emerge --ask app-crypt/easy-rsa
copy easy-rsa 套件到 openvpn 下
$ cd /etc/openvpn
$ cp -a /usr/share/easy-rsa .
$ cd easy-rsa
$ mv vars.example vars
修改 vars 內, 我比較傳統, 走舊式的方式
set_var EASYRSA_DN "org"
set_var EASYRSA_REQ_COUNTRY "TW"
set_var EASYRSA_REQ_PROVINCE "Taiwan"
set_var EASYRSA_REQ_CITY "New Taipei"
set_var EASYRSA_REQ_ORG "domain.com"
set_var EASYRSA_REQ_EMAIL "email@domain.com"
set_var EASYRSA_REQ_OU "Organizational Unit"
編輯完之後 清除所有的 PKI 設定
$ ./easyrsa init-pki
建立 ca 資訊, ca 要輸入密碼, 請記好. dh 是產生 Diffie-Hellman .pem file
$ ./easyrsa build-ca
$ ./easyrsa gen-dh
建立 Server 和 Client Key 資訊
$ ./easyrsa build-server-full server1 nopass
$ ./easyrsa build-client-full client1 nopass
中間有問密碼就是 ca 的密碼
最後, 編輯 /etc/openvpn/openvpn.conf
加上
dh /etc/openvpn/easy-rsa/pki/dh.pem
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server1.crt
key /etc/openvpn/easy-rsa/pki/private/server1.key
這樣應該就可以了, 下次更新不知道會不會是十年後的事情了呢?
ref.
Create a Public Key Infrastructure Using the easy-rsa Scripts
其實原來是參考 Arch 的文件, 不過太麻煩了
https://wiki.archlinux.org/index.php/Easy-RSA
On this day..
- BTRFS 心得 - 2017
- [Ubuntu] VirtualBox Remote RDP - 2014
- Gentoo PPPoE Problem - 2012
- 紀念好友林孟儒 - 2010
- [敗家] Google Dev Phone - 2009
- Flash 9 for Linux 正式版...... - 2007
- 退輔會為什麼會用到這麼多預算....... - 2007
- Logic Analyzer 中毒了..... - 2006
- 陳水扁 你被騙了........... - 2005
0 Comments.