如何设置IPSec VPN客户端

简介


使用VPN,可以让你随时随地,通过加密的隧道,安全访问公司内网资源。

我们使用基于IPSec最新的协议IKEv2来实现VPN。这个协议提供了更可靠快速的认证,以及漫游不同网络的能力。更方便的是,很多常用操作系统,如Window 7以上,macOS,iOS都内置了官方的客户端,使用起来也非常顺畅便捷。

本文介绍了如何在Windows, macOS, Ubuntu, iOS和安卓上设置VPN客户端的方法。

预先准备

  • 下载CA证书
  • 从你的网管那里获取连接参数
    • VPN服务器的域名,类似‘vpn.creekside.network’形式;
    • 你的VPN账户名和密码;
  • 使用安卓手机的客户请下载客户端

Windows10


安装证书

Windows10安装证书的手续略为复杂,请参考以下胶片(点击左右侧箭头可翻页)。

1. 搜索应用程序mmc.exe并以管理员身份运行

2. 从文件菜单,选择添加/删除管理单元

3. 从左侧选择“证书”,然后点击中间的“添加”按钮

4. 选择计算机账户,然后点击下一步

5. 选择本地计算机,然后点击完成

6. 返回证书管理页面

7. 浏览到受信任的根证书颁发机构,鼠标右键,在所有任务菜单下,选择导入

8. 进入证书导入向导

9. 在文件名输入框右侧,点击浏览

10. 找到你之前下载的证书文件,点击打开

11. 浏览择证书保存选择选项,并选择受信任的根证书

12. 恭喜你,完成了证书导入流程

previous arrowprevious arrow
next arrownext arrow
Slider

设置连接

Windows已经内置了IKEv2 VPN客户端。你需要在第4步里填写你收到的VPN服务器设置信息:

  • VPN服务商:选”Windows内置”
  • 连接名称:你可以自定义便于记忆的名称
  • 服务器名称或地址:填写服务器域名
  • VPN类型:选择“IKEv2”
  • 登录类型:账户名和密码
  • 账户名:你的账户名

1. 从任务条右下角,点击网络连接图标。

2. 点击左侧的VPN选项。

3. 右边VPN页面下,选择添加VPN

4. 根据前面说明,填写相应的内容。不要使用图片中的信息

5. 你已完成设置,使用连接启动VPN。

previous arrow
next arrow
Slider

通过VPN访问互联网

IKEv2自动支持split tunnel功能,也就是只有远程网络才走VPN隧道,互联网流量还是走本地网关。在某些应用场景下,如果你希望使用公司的网络来访问互联网,就可以根据以下步骤完成进一步的配置。

1. 在 VPN 页面下, 点击相关设置下的 更改适配器选项

2. 鼠标右键点击VPN连接, 然后从下拉菜单中选择 属性

3.在对话框中,选择网络分页,然后选择TCP/IPv4一行,点击属性

4. 点击右下方的 高级...

5. 勾选在远程网络上使用默认网关,取消勾选自动跃点,并在下方的输入框内填入数字1

previous arrow
next arrow
Slider

Android


Android没有原生客户端,需要下载,并按以下步骤安装。

在应用商店里搜索 “Strongswan VPN Client” 并安装。你也可以从这里下载APK文件并手动安装。

1. 下载Strongswan VPN客户端

通过邮件,或者点击这个链接,下载证书文件到手机,并点击打开。

2. 保存证书文件到手机

选择右侧的证书安装工具,安装证书。

3. 安装证书

你可以用任何字符串命名你的证书,在证书用途上选择VPN应用。然后点击“OK”完成证书安装。

4. 配置证书

打开“Strongswan”应用程序。因为是第一次使用,页面会显示“无活跃VPN”。点击右上角的“添加VPN配置”。

5. 添加VPN配置

输入合适的配置参数(图例只是参考)
- 服务器地址: 输入发送给你的域名.
- VPN 类型: “IKEv2 EAP(用户名/密码)”
- 用户名: 你收到的用户名
- 密码: 你收到的密码
- CA证书: 确认“自动选择”已勾选.(缺省)

完成后保存。

6. 配置VPN连接

回到主页面,点击相应 的VPN配置,即可连接到VPN服务器。

7. 连接到VPN服务器
previous arrow
next arrow
Slider

macOS


首先按以下步骤安装证书:

  • 双击下载的证书文件。钥匙串访问应用会自动弹出一个对话框,并提示“钥匙串访问正在尝试修改系统钥匙串。输入密码以允许此次操作“
  • 输入你的计算机密码,然后点击修改钥匙串
  • 双击刚才新引入的VPN证书Creekside Networks Authority。一个参数设置窗口会弹出来,点击信任左侧的箭头,然后在IP安全 (IPSec)一栏中,把缺省的用不信任改成始终信任
  • 系统会再次要求你输入密码确认。确认完成后,刚才的改变会自动被保存下来。证书导入完毕。

接下来我们设置VPN连接。

  • 打开系统偏好设置,选择网络
  • 点击左侧网络列表框下面的“+“号;
  • 在弹出的对话框里
    • 选择接口为VPN
    • VPN类型缺省是IKEv2,这个不要改;
    • 服务名称项目里,你可以输入任何你喜欢的名字;
    • 完成后点击创建;
  • 在新的连接页面里,
    • 服务器地址:输入管理员发给你的域名;
    • 远程ID:和上述服务器地址一样的域名;
    • 本地ID:保持空白;
    • 点击认证设置…,在对话框里输入:
      • 用户名:你的VPN用户名;
      • 密码:你的VPN密码;
      • 完成后,点击“
    • 回到连接页面后,点击应用以保存刚才的设置;
    • 点击连接,你就会连接到VPN服务器了。

iOS


按照以下步骤配置VPN:

  • 使用隔空投送把证书文件发送到你的手机;
  • 一个对话框会自动弹出来,如果你有Apple Watch, 会首先提示你选择选择要安装的设备,选择iPhone,系统会提示描述文件已下载。
  • 打开设置应用,找到通用并打开
    • 向下滑动到描述文件一行出现,点击打开;
    • 在已下载的配置描述文件下方的列表里,点击Creekside Networks Authority一项;
    • 在随后出现的安装描述文件页面中,点击右上角的安装按钮;
    • 输入你的锁屏密码
    • 再次点击安装,证书安装就完成了。
  • 回到通用页面,我们开始配置VPN连接:
    • 向下滑动到VPN一行,点击打开;
    • 在页面的最后一行,点击添加VPN配置…,进入添加配置页面
      • 类型:使用缺省的IKEv2
      • 描述:VPN连接的名称,填写你公司的名称或者任意名字;
      • 服务器地址:输入管理员发给你的域名
      • 远程ID:和上述服务器地址一样的域名
      • 本地ID:保持空白
      • 用户鉴定:保持用户名不变
      • 用户名:你的VPN用户名;
      • 密码:你的VPN密码;
      • 最后点击左上角的完成
    • 回到VPN页面
      • 点选刚才设置的VPN连接;
      • 状态一栏,点击未连接右侧的开关;
      • 你就会连接到VPN服务器了。

Ubuntu


Ubuntu 16.04

首先,我们要下载Strongswan源码,编译并安装:

cd ~
sudo apt-get install -y libssl-dev libglib2.0-dev libnm-dev
wget http://download.strongswan.org/strongswan-5.6.3.tar.bz2
tar xjf strongswan-5.6.3.tar.bz2
cd ~/strongswan-5.6.3
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib \
   --disable-aes --disable-des --disable-md5 --disable-sha1 
   --disable-sha2 --disable-fips-prf --disable-gmp --enable-openssl \
   --enable-nm --enable-agent --enable-eap-gtc --enable-eap-md5 \
   --enable-eap-mschapv2 --enable-eap-identity
make
sudo make install

然后是NetworkManager的Strongswan插件。

cd ~
sudo apt-get install -y intltool libgtk-3-dev libsecret-1-dev \
  libnma-dev network-manager-dev libnm-util-dev libnm-glib-dev \
  libnm-glib-vpn-dev libnm-gtk-dev

wget http://download.strongswan.org/NetworkManager/NetworkManager-strongswan-1.4.4.tar.bz2

tar xjf NetworkManager-strongswan-1.4.4.tar.bz2
cd ~/NetworkManager-strongswan-1.4.4
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib

make
sudo make install

Ubuntu 18.04

我们先下载官方的Strongswan以及相应的NeworkManager插件。

sudo apt install -y strongswan libcharon-extra-plugins network-manager-strongswan

Setup VPN connections

VPN客户端安装好了,接下来是配置VPN连接。

  • Open System Settings, then select Network;
    • Ubuntu 16.04:
      • Click the + sign at the left-bottom corner, choice Interface type to VPN, then click Create;
    • Ubuntu 18.04
      • Click the + sign at the right side of VPN list.
  • A VPN connection type dialog box will pop out, choose IPSec/IKEv2 (Strongswan), click Create;
    • Now a configuration dialog box will pop out. fill in information as directed below;
      • Name: Any text you like to name the VPN connection
      • Gateway
        • Address: The VPN server’s domain name IT sent to you.
        • Certificate: Browse to choose the certificate file you received. 
      • Client
        • Authentication: Select “EAP
        • Username: Use the userid that is given to you.
        • Password:
          • Click the icon at the end of input box.
          • Select the 2nd option: Store the password for all users.
          • Input your password
      • Options:
        • Make sure you check the “Request an inner IP address”.
        • Optionally you may also check Enforce UDP encapsulation
        • Leave use IP compression unchecked.
      • Cipher Proposals
        • Leave this section blank.
    • Finally click the “Add” button to save the configuration.

如何设置IPSec VPN客户端》有56,258个想法

  1. Kastrup Slater

    You is likely to search for finding a reliable online casino website through the internet. Of course, if you want to have maximum fun, you should be choosy on site wireless. If you want to avoid to have to download anything or if you would like to provide for the luxury to play anytime, anywhere, th

    回复
  2. Lyon Ellington

    Sports movies have a long history of capturing the imaginations of audiences and inspiring them like few other genres can. Movies about football are no exception. Many films based on America’s most loved game have entertained audiences and brought new meaning to the game by showing operate can bring

    回复
  3. Hicks Currie

    Home improvement might provide you with into give up hope and mind-boggling feelings of items you won’t have the ability to total. Have zero fear, there are home improvement tasks open to match any capability. Increasing your home can help you in the long run this article has ideas for do-it-your se

    回复
  4. slotxo

    Hey! I could have sworn I’ve been to this
    blog before but after reading through some of the post I realized it’s new to me.
    Anyhow, I’m definitely glad I found it and I’ll be book-marking and checking back often!

    回复
  5. Rahbek McAllister

    The solution is different each and 1 of users. I myself can vanish from gambling for weeks or months at a time without any effect on the emotional wellness. If I never had another bet in existence it shouldn’t bother for me.But with the exception Paris and New York, Las Vegas is primary pl

    回复
  6. Bentzen Kirby

    Powerball prizes aren’t based on true probabilities, but rather derive from a mathematical formula. The Powerball winners are allotted a specific percentage of a jackpot prize if there are at the very least eligible numbers on the draw table. For instance, if you can find twenty eligible numbers and

    回复
  7. Marks Perez

    You might go for space saving products for use in your kitchen. Counter depth appliances save space and in some cases help help make your kitchen truly feel much more substantial.OIL Artworks. As previously mentioned there are numerous reasonably priced software programs to convert any pho

    回复
  8. Navarro Yang

    How to Beat the Casino With Online Craps – A Real AdvantageOnline Casino Gambling has grown from a tiny little niche, barely scratching the surface of internet gambling to one of the largest, most recognized pastimes on the internet today. Millions of players from across the world log on

    回复
  9. Rice Maynard

    These are nevertheless small and compact but offer more room than the opposite sizes. These start out at around 3.2 cubic feet and go all of the way up in size to 5 cubic tip toes. Many of these are sized always be counter top level in addition a few models actually have a counter top built on. This

    回复
  10. bet online deutschland

    Fantastic website you have here but I was wanting to know if you knew of any community
    forums that cover the same topics talked about in this article?
    I’d really love to be a part of group where
    I can get feed-back from other experienced people
    that share the same interest. If you have any recommendations, please let me know.
    Thanks a lot!

    回复
  11. judi qq

    You actually make it seem really easy together with your presentation but I
    to find this topic to be actually one thing which I feel I’d never
    understand. It seems too complicated and extremely
    large for me. I am looking forward on your subsequent submit, I’ll attempt to
    get the cling of it!

    回复
  12. McDermott Wang

    BocVip Club – Cổng truy cập tải và chơi game mới nhất của siêu phẩm slot game 2020 Bốc Club. Xứng đáng là một trong những sự lựa chọn hàng đầu của game thủ Việt, phiên bản Bốc Vip được các chuyên gia về game đổi thưởng đánh giá cực cao về tất cả các khía cạnh, bao gồm chất lượng trải nghiệm, hệ thốn

    回复
  13. Judy Tharpe

    I have been surfing online more than 2 hours today, yet I never found any interesting article like yours.

    It is pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the internet
    will be much more useful than ever before.

    回复
  14. Browne Short

    You are interested in learning more about home improvement. With much information available online, it is actually tough to define what is reputable and exactly what is garbage. In this article we provides you with high quality guidelines which could just work for you.To save cash on air c

    回复
  15. Funch Flood

    Looking to carve a place across the world of professional golf? Want to get recognized in the planet? Well, to get noticed and show your caliber to turmoil you need Football Trials. If you genuinely want to do something in the world of football then it’s the perfect time pick these trials. Moreover,

    回复
  16. Rytter Jeppesen

    Generally, mobile casinos are compatible with iPhone, Blackberry, Android, Windows Mobile together with other major os. Some even requires you to specify the actual model in order to have for you to can download the ball game. It is still in order to check for compatibility challenges before anythin

    回复
  17. Winther Wagner

    Powerball prizes receive for different reasons. The jackpot prize is given to the winner. Other prizes could be for drawing number combinations and/or specific number combinations. Powerball winners receive additional chances at winning the jackpot. In addition, Powerball players can also be awarded

    回复
  18. McWilliams Sander

    Are you interested in playing online powerball? If that’s the case, then you will first need to find a good online powerball site to register with. When you decide which site you need to play at, you should research the web powerball site thoroughly. There are many factors that should be considered

    回复
  19. Atkinson Hede

    Selama berabad-abad, orang-orang berusaha kelelahan dengan mencoba keluar keberuntungan mereka dalam judi. Orang Romawi kuno melakukannya, orang Cina kuno melakukannya, atau lebih sampai hari ini, perjudian masih bagian dari budaya manusia. Era perjudian tidak pernah berubah hingga hari ini.

    回复
  20. hot girls in bikinis

    Howdy excellent blog! Does running a blog similar to this take a lot of work?
    I’ve absoluutely no understanding of computer programming however I had been hoping to start mmy
    oown blog soon. Anyways, should you have any ideas or tips
    for new blog owners please share. I understand this is off topic however I simply wanted to ask.
    Kudos!

    回复
  21. Ruth Herrmann

    I will immediately seize your rss as I can’t in finding your
    email subscription link or e-newsletter service.
    Do you’ve any? Kindly let me realize in order that I may just subscribe.
    Thanks.

    回复
  22. Qvist Holmes

    Gambling has grown into a recognized element of popular culture, similar to recreational exercises. It is the same as attending films, athletic events as well as concerts or stage plays. In New Zealand, a large majority of Kiwis who gamble at New Zealand casinos try as a kind relaxation with great r

    回复
  23. Kure Atkins

    Powerball prizes receive for different reasons. The jackpot prize is given to the winner. Other prizes could be for drawing number combinations and/or specific number combinations. Powerball winners receive additional chances at winning the jackpot. Furthermore, Powerball players may also be awarded

    回复
  24. Mccarty Bille

    Thirty back this guy would been recently fired. No questions asked. Incompetence was not tolerated. But today, employment law is big money, and incompetence is rewarded with promotions. Driven by fear we appear to be living in the topsy-turvy world which is even worse at the executive standard. I’ve

    回复
  25. Marilyn Bailey

    I’ve been surfing online more than 2 hours today,
    yet I never found any interesting article like yours.
    It’s pretty worth enough for me. In my view,
    if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before.

    回复
  26. Green Snider

    So how do you know each time a gambling is actually ruining living? What are some of the indicators that things are spiraling via control, and that your days are truly becoming unmanageable?A no deposit casino is a sort of online casino certainly where an player perhaps into an e-casino on

    回复
  27. Axelsen Bauer

    Then the subsequent step a person can have in order to do is to measure the bonus which is provided on the games. If ever the bonus is more approach total amount that won by you will definitely be more. Thus it becomes very needed to know the best way to win at casinos online or else you can lose yo

    回复
  28. solarbet

    I blog frequently and I seriously thank you for your content.
    The article has truly peaked my interest. I will take a note of your site and keep checking for new information about once a week.
    I subscribed to your Feed as well.

    回复
  29. mbee.com.vn

    Hi there I am so happy I found your webpage, I really found you
    by mistake, while I was searching on Aol for something
    else, Anyways I am here now and would just like to say kudos for a
    marvelous post and a all round interesting blog (I also love
    the theme/design), I don’t have time to browse it all
    at the moment but I have book-marked it and also added
    in your RSS feeds, so when I have time I will be back to read a great
    deal more, Please do keep up the great b.

    回复
  30. Secher Hudson

    If tend to be concerned about keeping beverages chilled, way . get a refrigerator, small or large depending on space, enable keep those drinks nearby. Just about be not anymore need to pause the film while you run to the kitchen for a refill. Just pop open the fridge, grab a soda, and enjoy.<br

    回复
  31. Koenig Black

    Are we so gullible that we’re willing to damage our future looks, health, and longevity for a few chips, 3 beers, a dish of ice cream, and a piece of pie?There lots of no first time deposit bonuses available for anyone kinds of gambling web pages. The already mentioned no deposit poker bon

    回复
  32. Mcfarland Secher

    Online Casinos Offer Some Amazing Advantages to PlayersCasino play has always been one of the most popular casino games enjoyed by people of all ages. It is a game based on strategy and luck. Luck is the main element of casino play, but this does not mean that you cannot play a good game

    回复
  33. Lonnie

    Good day! Do you know if they make any plugins to safeguard against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard on. Any
    suggestions?

    回复
  34. Goldstein Kirkland

    There are many reasons that one should choose a sm casino. First of all, the sm casino offers free transportation to and from the casino for players who participate in a bingo tournament. The a casino also has a wonderful reputation as one of the top casinos in the world. The sm casino is a wonderfu

    回复
  35. Mccarty Damsgaard

    Home improvements can fulfill a variety of diverse desires for virtually any house owner, from the need to increase a home’s benefit, to a desire for a much more livable room, to some basic curiosity about finding something new. Below are a few recommendations that may discuss stuff that you need to

    回复
  36. Fournier Hooper

    Strangely, issue logic doesn’t apply when an American buys a regular book (or a car) which might bring into Canada with him and employ here. May be true so it is easier for Canada to assess such items at the border as compared to cyberspace, on the other hand know of no cases of Americans being taxe

    回复
  37. Torp Wolfe

    SSL Private Proxy really is passionate, honest, and good having plenty of excellent reasons for you to select their service. More importantly, they’re absorbed with what they actually do and what they intend. They provide you with the top private proxies and VPS with proper prices. What’s more, in a

    回复
  38. Norton Lindberg

    Each participant receives a playing card with a random number on it. When the player buys a powerball ticket, she marks a number on the card and considers it her ticket amount. The ball player must keep her eyes on the card while playing it. The winner may be the person who marks the winning number

    回复
  39. Reid Erlandsen

    Ten years ago, research online regarding real estate might have started in the office of the nearby real estate broker or by simply driving around area. At the agent’s office, you would certainly spend an mid-day flipping through webpages of active property listings from the local Multiple Listing S

    回复
  40. Maddox Dobson

    Second, you will need to select a way to fund your account and withdraw your takings. Each online casino offers multiple methods to accomplish this, so understand everything very carefully, and select the option you think is beneficial to your relationship. The great thing relating to this step in t

    回复

发表评论

邮箱地址不会被公开。