早上好,
我正在尝试配置 VPN 的最低要求。服务器是centos 7的全新安装(如果更简单我可以试试其他的)我已经按照这个网站的说明做了https://www.cyberciti.biz/faq/centos-7-0-set-up- openvpn-server-in-5-minutes/ 我也尝试了手动方式https://www.digitalocean.com/community/tutorials/how-to-set-up-and-configure-an-openvpn-server-on- centos-7
但是当我尝试在 mac 上与 tunnelblick 连接时,我只能通过他们的 IP 访问站点(所以 DNS 问题),我在我的服务器上添加了一个 PHP 脚本来拥有我的公共 IP 但它仍然是我的旧公共 IP 使用而不是新的那一个。似乎根本没有使用 VPN
同样在一段时间后 tunnelblick 在控制台中显示“
2019-04-05 19:14:50 Tunnelblick[59941] currentIPInfo(Name): IP address info could not be fetched within 34.3 seconds; the error was 'Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x600001f05530 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://tunnelblick.net/ipinfo, NSErrorFailingURLKey=https://tunnelblick.net/ipinfo, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=https://tunnelblick.net/ipinfo, NSErrorFailingURLKey=https://tunnelblick.net/ipinfo, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}'; the response was '(null)'
2019-04-05 19:15:25 Tunnelblick[59941] currentIPInfo(Address): IP address info could not be fetched within 35.0 seconds; the error was 'Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x600001fc76f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://205.233.73.116/ipinfo, NSErrorFailingURLKey=https://205.233.73.116/ipinfo, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=https://205.233.73.116/ipinfo, NSErrorFailingURLKey=https://205.233.73.116/ipinfo, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}'; the response was '(null)'
2019-04-05 19:15:25 Tunnelblick[59941] An error occured fetching IP address information after connecting
我还尝试在我的 android 和 virtualbox 中使用 linux mint
openvpn --config cclient.ovpn
Options error: Unrecognized option or missing parameter(s) in cclient.ovpn:21: tls-crypt (2.3.10)
Use --help for more information.
但是第 21 行在加密密钥的中间
并且 tls-crypt 标签存在但之后。
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
f3856bf6762970d83c25eccd966400dc
d6ec43b27660930701d6ebd6efbaa3da
...
这是 ovpn 的全部(暂时不关心安全性)
client
proto udp
remote 193.148.68.62 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_BJMqmYrUxDaMZl3k name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIIBwjCCAWegAwIBAgIJAKCDTh1DURAlMAoGCCqGSM49BAMCMB4xHDAaBgNVBAMM
E2NuXzJaUDlSVFphUGh4NWliNlQwHhcNMTkwNDA1MTU1MjM0WhcNMjkwNDAyMTU1
MjM0WjAeMRwwGgYDVQQDDBNjbl8yWlA5UlRaYVBoeDVpYjZUMFkwEwYHKoZIzj0C
AQYIKoZIzj0DAQcDQgAEynRBDBwK1u00mhLN2jUTGVSHGwVfDaXCbIL/XZBazfvf
79LUoTwGYUKp4ka/Jx/BDF7EKNteWPLziPoBZ/vV06OBjTCBijAdBgNVHQ4EFgQU
4ivwFfTgbZnpzRKkHmGa3VRy+NwwTgYDVR0jBEcwRYAU4ivwFfTgbZnpzRKkHmGa
3VRy+NyhIqQgMB4xHDAaBgNVBAMME2NuXzJaUDlSVFphUGh4NWliNlSCCQCgg04d
Q1EQJTAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAKBggqhkjOPQQDAgNJADBG
AiEAtM0HNJRX3xvofmlPwD7rntRj2obwLoY+8td02rDCAbwCIQCxuO1vNOQOrSyy
LshRURfmIyWfsDqamYfn3APUUAvttQ==
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
MIIBzTCCAXOgAwIBAgIQDcXZ3dwQ3NvBLD/hEJAjlDAKBggqhkjOPQQDAjAeMRww
GgYDVQQDDBNjbl8yWlA5UlRaYVBoeDVpYjZUMB4XDTE5MDQwNTE1NTQwMloXDTIy
MDMyMDE1NTQwMlowETEPMA0GA1UEAwwGY2xpZW50MFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEGbEMBPaSe/l0e7+UzQDW0PIUNTUu5bZqo9pIG/26/Xa38o2Ck+wk
UdcOj8Z9ggbPwHu+x8s1ppTTyxn+ZsNw1aOBnzCBnDAJBgNVHRMEAjAAMB0GA1Ud
DgQWBBSEY73UYBhDTZ54fwnMIFDwAJJWSjBOBgNVHSMERzBFgBTiK/AV9OBtmenN
EqQeYZrdVHL43KEipCAwHjEcMBoGA1UEAwwTY25fMlpQOVJUWmFQaHg1aWI2VIIJ
AKCDTh1DURAlMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDAKBggq
hkjOPQQDAgNIADBFAiEA2F1KHsgrhu2foCz7D476A7NEAJ94KAAZ3E+do6hgHysC
IAZBnrKqN+9C60CoJyYA/JCmms/Ed8Q9Fipj4wrvQHLQ
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
[private key redacted]
-----END PRIVATE KEY-----
</key>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
f3856bf6762970d83c25eccd966400dc
d6ec43b27660930701d6ebd6efbaa3da
dee8e380cf94855e0f2ce1e9f832c4f6
613c6c51e97904b1e93182b2753bdcb8
c7f6573e74e8ce5640c329438b73241b
494a3935443f03717fd68dfe9c0d2bb5
755e9309b5e12a62452599bfaaef60ef
50f91463958edd07e4014c8503c8ed8f
da1ad0b1d42cdc169c3fbc1703b1662c
9ac3d32aa36254e73659d2f73ff44400
8e0a1692d808f7607111bf5becf32a91
5f2b44906b24a55939de881cb2406c25
80714f5aed426e1790950079f466afa2
7e61c35d2f6939479fab9e714813bb4c
00a71ce2954ff7bf8a0194622d0f21c6
4a00adf365708a59683468060ff23056
-----END OpenVPN Static key V1-----
</tls-crypt>
所以我真的不明白为什么它不起作用。我没有在我的服务器上安装防火墙(没有安装 firewalld),一个 tun 被激活。
如果您有在 linux mint 或 osx 上取消阻止连接的想法,那将会很有帮助。谢谢你
我最终通过遵循包含客户端软件的完全不同的教程解决了问题。 https://www.vultr.com/docs/installing-openvpn-on-centos-7
配置:
CentOS Linux release 7.6.1810 (Core) 在 open VZ 中,内核为 2.6.32-48-pve
openVPN 版本:openvpn-as-2.0.10-CentOS7.x86_64.rpm(新版本的库依赖问题)
我必须禁用系统完整性保护才能使“OpenVpn Connect”在 Mac 上运行并避免“运行 jsondialog 时出错”
步 :
选择一个密码
在 chrome/firefox 或其他浏览器中转到 yourpublicip:943/admin 连接 openvpn 和选择的密码。接受所有内容,然后在停止时点击启动服务器。
在浏览器中转到 yourpublicip:943 并再次与用户 openvpn 连接。
单击下载 openvpn 连接并输入登录名和密码
苹果电脑
如果出现 json 错误http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/