VPN 到特定组织

VPN 到特定组织

我对 ubuntu 15.10 中的 VPN 有疑问。我想连接瑞典隆德大学的 VPN。我有:我的用户名和密码。我还可以从网络管理器配置 VPN,我已经连接到另一个 VPN,但我有三个文件 ca.crt、certificate.crt 和 key.key,它们是通用文件,所以我可以用它们连接到那个 VPN?另外,我不知道网关是什么,可以是 connect.lu.se 吗?

我至少想知道如何使用我在 windows8 上使用的用户名和密码连接到隆德大学。下面您可以找到我所做操作的说明。

右侧部分显示用于创建 VPN 的主网络管理器窗口,左侧 4 个小窗口显示高级选项。为了让免费 VPN 工作,我输入了网关、用户名、密码和下载的三个证书文件,然后转到高级选项。第一个选项卡(常规)我将端口设置为 443,标记使用 LZO 压缩并使用 TCP。第二个选项卡将密码设置为 AES_128-CBC

谢谢,Elsaid

答案1

运行这个:

sudo apt-get install openvpn

安装 OpenVPN 包。然后,在您的主目录中创建一个新文件client.conf。编辑该文件以包含以下内容:

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.  On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server?  Use the same setting as
# on the server.
;proto tcp
proto udp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote connect.lu.se 1194
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing.  Otherwise
# try hosts in the order specified.
;remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nogroup

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here.  See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

# Wireless networks often produce a lot
# of duplicate packets.  Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description.  It's best to use
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
ca ca.crt
cert certificate.crt
key client.key

# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server".  This is an
# important precaution to protect against
# a potential attack discussed here:
#  http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server".  The build-key-server
# script in the easy-rsa folder will do this.
ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20

这是 OpenVPN 的通用客户端配置文件。现在,要连接,请从主目录运行以下命令:

sudo openvpn client.conf

使用给定的配置文件进行连接。

确保您的 CA.CRT、CERTIFICATE.CRT 和 KEY.KEY 文件也位于您的主目录中

相关内容