我关注了这里的文章: 如何在 Ubuntu 18.04 上设置 OpenVPN 服务器 | DigitalOcean
运行时~/client-configs/make_config.sh
我收到此错误:
./make_config.sh: line 9: /dev/fd/63: Permission denied
/root/openvpn-ca/keys/ca.crt: line 1: -----BEGIN: command not found
/root/openvpn-ca/keys/ca.crt: line 2: etc etc.... (certificate file)
/root/openvpn-ca/keys/ca.crt: line 30: -----END: command not found
./make_config.sh: line 12: /root/openvpn-ca/keys/server.crt: No such file or directory
./make_config.sh: line 14: /dev/fd/63: Permission denied
./make_config.sh: line 15: /dev/fd/63: Permission denied
/root/openvpn-ca/keys/ta.key: line 4: -----BEGIN: command not found
/root/openvpn-ca/keys/ta.key: line 5: etc. etc... (certificate file)
/root/openvpn-ca/keys/ta.key: line 21: -----END: command not found
./make_config.sh: line 17: /dev/fd/63: Permission denied
这是make_config.sh
:
#!/bin/bash
# First argument: Client identifier
KEY_DIR=~/openvpn-ca/keys
OUTPUT_DIR=~/client-configs/files
BASE_CONFIG=~/client-configs/base.conf
cat ${BASE_CONFIG} \
<(echo -e '<ca>') \
${KEY_DIR}/ca.crt \
<(echo -e '</ca>\n<cert>') \
${KEY_DIR}/${1}.crt \
<(echo -e '</cert>\n<key>') \
${KEY_DIR}/${1}.key \
<(echo -e '</key>\n<tls-auth>') \
${KEY_DIR}/ta.key \
<(echo -e '</tls-auth>') \
> ${OUTPUT_DIR}/${1}.ovpn
目前还不确定该做什么来解决这个问题。