我想将我的 OpenVPN 客户端配置提交给版本控制,在远程托管和公开访问的存储库中。
这将显示服务器的主机名和端口,以及 .crt 和 .key 文件的文件路径。
我应该担心泄露服务器的主机名/端口,还是会因为默默无闻而被视为安全?
更一般地说,这有多安全/不安全?
混淆的示例配置如下所示:
client
dev tun
proto udp4
remote my.example.net 1194
remote-cert-tls server
tls-auth /home/ivan/path/to/ta.key 1
cipher AES-256-CBC
ca /home/ivan/path/to/ca.crt
cert /home/ivan/path/to/myuser.crt
key /home/ivan/path/to/myuser.key
nobind
user nobody
group nogroup
persist-key
persist-tun
comp-lzo yes
auth-nocache
更新:感谢您的反馈。将“通过默默无闻的安全性”与选择不公开超过必要的安全系统进行对比的观点做得很好。
我意识到我正在执行此操作的上下文提供了一种简单的方法,可以在提交其余配置时从版本控制中排除某些配置。Git repo 用于我的 NixOS 系统配置,因此我可以将我的 vpn 配置的敏感部分放在一个单独的文件中,我将 gitignore,并将其内容插入到 nix 组成的最终配置文件中。
所以我的 configuration.nix 会有类似的东西:
services.openvpn = {
servers.fooServer = {
config = ''
# The insensitive stuff inline, committed to Git
client
dev tun
# etc...
# The sensitive stuff slurped from a gitignore'd file
${builtins.readFile ./foo-server.private.conf}
''
}
}