如何设置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,290个想法

  1. 5 paragraph essay generator free

    Write more, thats all I have to say. Literally, it seems as though you
    relied on the video to make your point. You obviously know what youre talking
    about, why waste your intelligence on just posting videos to
    your blog when you could be giving us something informative to read?

    回复
  2. Tucker Fischer

    When you are trying to lose weight, it really is beneficial to experience a weight loss buddy. Having a friend or acquaintance and have confidence in, to share your successes and challenges with, tends to make the path to getting into good shape much easier. Hire a company who shares the identical o

    回复
  3. see this site

    Sweet blog! I found it while surfing around on Yahoo News.

    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Many thanks

    回复
  4. Ejlersen Colon

    If there are any small space to work with, next the modern kitchen is probably your best choice. The reason is simply as a result of straight lines and the void of embellishment. On the other hand hand, should the room is exceptionally large, you would require some thing to entertain the eye lids.<b

    回复
  5. Childers Laugesen

    Make sure you get appropriate sleeping whilst attempting to lose weight. Getting effectively relaxed does not just imply you will have sufficient vitality to the day’s occasions. Obtaining correct sleep at night helps your metabolic process keep on track. Failing to get ample sleep at night or subst

    回复
  6. Dinesen Stokes

    If you are looking for a casino with many slot machines, poker games, blackjack and craps games, then you should visit a reliable casino site. The aim of the casino is to make sure that they provide their customers with the best slots, roulette and poker games, blackjack games and other casino games

    回复
  7. Alanjek

    [url=https://cialiseti.com/]cialis 5mg best price australia[/url] [url=https://cialissx.com/]dapoxetine buy online[/url] [url=https://viagracap.com/]can you buy sildenafil over the counter in uk[/url] [url=https://cialisphm.com/]cialis canada fast shipping[/url] [url=https://ipillviagra.com/]buying generic viagra online[/url] [url=https://midviagra.com/]viagra south africa price[/url] [url=https://effviagra.com/]no prescription viagra canada[/url] [url=https://cialisvm.com/]price of cialis in usa[/url] [url=https://ozzmeds.com/]strattera 14 mg[/url] [url=https://cialiseff.com/]cost of cialis 20 mg[/url]

    回复
  8. Bolton Ovesen

    There are lots of places for courting suggestions currently. The Internet is full of content articles, dating tips and advice posts. All are valuable, but online dating services possess some distinctive benefits around off the internet resources. Some online dating services enable members to search

    回复
  9. Hahn Michelsen

    There are numerous resources for online dating guidance these days. The World Wide Web is filled with content articles, online dating advice and tips posts. Are all valuable, but online dating services possess some specific advantages more than off the internet places. Some online dating services en

    回复
  10. Kilic White

    When the new and existing paints are blended (smoothed to the flat plane) to your satisfaction, clean the area using a very good car wash and regarding water after use a premium glaze to bring back the shiny finish. I favor 3M Imperial Hand Glaze. Don’t make use of a machine during your car.<br

    回复
  11. Vinson Jernigan

    The James Bond game is very popular among casino goers as it is a game that requires strategy and good playing skills. Casino goers play this game as it can be fun and exciting at the same time. Casino goers should not be afraid of playing such games as the use of online technology has made it possi

    回复
  12. Carstens Spence

    Losing weight is one thing, but sustaining that key body weight shortly becomes a new problem. To get this done, you are going to must stick with an identical regimen to the one which helped bring one to this new target and boost it where required. Will not allow oneself go because you believe the t

    回复
  13. Crawford Mortensen

    Sometimes when you’re seeking to quit smoking, shock methods can help. Check out a few images of cancer individuals, people who have old considerably as a result of tobacco, or damaged lung area. Keep these in view all the time and they also just might shock you into keeping away from these harmful

    回复
  14. click here for more info

    I loved as much as you’ll receive carried out right here.

    The sketch is tasteful, your authored material stylish.
    nonetheless, you command get got an edginess over that you
    wish be delivering the following. unwell unquestionably come
    further formerly again as exactly the same nearly very often inside case you
    shield this hike.

    回复
  15. Denjek

    [url=https://cialispwr.com/]cialis nz[/url] [url=https://wheretocialis.com/]cheap online generic cialis[/url] [url=https://lmopharm.com/]amoxicillin tablets for sale[/url] [url=https://cialisdx.com/]cialis online 60mg[/url] [url=https://viagrahere.com/]buy kamagra uk fast delivery[/url]

    回复
  16. Foss Enemark

    Kickoffbet is a betting system แทงบอลออนไลน์ that has been around for more than 10 years. It’s a simple, quick and easy to learn technique to help you in betting on football online. It uses the analogy of a casino. Players will stand on a gambling floor, hand a wad of money to the “gambling technici

    回复
  17. Barnes Ziegler

    Workout may be fairly dull. When attempting to lose weight, be sure you get some amusement throughout these very long cardiovascular sessions. Get yourself a publication to learn or perhaps an audio reserve to hear. Produce a music playlist that may be fast and high-electricity and definately will r

    回复
  18. Borg Stokholm

    If anyone might have finished priming all your prepared chips before a couple of hours are up, cover with a box, taped down with masking mp3. The key is to permit the first coat of primer to dry certainly two a long while.These don’t actual written notes, though they certainly can be if yo

    回复
  19. Levy Finnegan

    Hart catcher Matt Quintanar had three hits in a season-opening baseball victory. (Matt Quintanar) Jim Ozella has coached some very good catchers over time, from Mike Sims at Bishop Alemany to Trevor Brown at Hart. They’re all going to rank behind junior Matt Quintanar, who Ozella is convinced can be

    回复
  20. fun88

    Heya just wanted to give you a quick heads up and
    let you know a few of the images aren’t loading properly.

    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different internet browsers and both show the same results.

    回复
  21. Midtgaard Davies

    While you are attempting to lose weight, it helps to become familiar with portion sizes which means you are more aware of what you’re eating. For example, a percentage of meat is simply the size of a outdoor patio of credit cards. Knowing serving sizes can make it easier to harmony your daily diet t

    回复
  22. Quinn Saleh

    A wonderful way to slim down is to get the telephone and phone a pal each and every time you’re feeling feeling hungry. If you mobile phone a buddy any time you feel hungry you’ll distract on your own, and you’ll instantly shed the need you have to eat some thing. Your friends won’t mind being aware

    回复
  23. Gottlieb Purcell

    Exercise is an important aspect in weight loss. It is very important try to get half an hour every single day.Determine what your most significant guilty-enjoyment meals are and combine its types into healthful recipes. For example, if you enjoy Mexican food, add salsa for your egg-white-c

    回复
  24. Mosley Chapman

    Just enough has survived from this era to help kitchen designers of our day get inspiration and produce that same quality and functionality into our rentals. While originally shaker kitchen designs possess been maple or cherry. Modern times and people’s needs have of course changed over 300 long per

    回复
  25. qqslot

    Excellent post. Keep writing such kind of
    information on your site. Im really impressed by your site.

    Hi there, You have done a fantastic job.
    I will definitely digg it and for my part recommend to my friends.
    I’m confident they will be benefited from this web site.

    回复
  26. Potts Kinney

    Stop and think: Next group of organs key started the car intermittently – sometimes it worked, and in some cases it do not. Unbeknownst to us, had been a small burr over the new point. Yet, could it be vehicle key that’s causing the ignition obstacle? We took our auto on the dealer. He tried both ke

    回复
  27. Fuller McGregor

    It is essential that you obtain ample sleeping when you are attempting to lose weight. Not receiving adequate sleep every single night will lessen your energy each day. If you don’t have enough electricity, you body will want to replace with it by making you feeling hungry. Obtaining enough sleeping

    回复
  28. Dunlap Emerson

    An auto repair manager may donrrrt great tips guide. A checklist planned together with aid will go a great in holding your car correctly. Need to be followed guidelines in order to followed accurately for greatest results.Look for their provider you can depend on to inspect your vehicle fo

    回复
  29. Dawson Mendoza

    Are your websites ‘starving’ of drivers? Want to learn to enhance your traffic? eBay is a good way to do those. Although it’s now not possible to build a list by selling digital products directly on Ebay, it is still very much possible the following eBay for a traffic generator to funnel highly-targ

    回复
  30. Flowers Sears

    Dix was a faculty instructor who endeavored to assist people with psychological issues and to expose the sub-commonplace circumstances into which they have been put. Before this movement, it was not uncommon that individuals affected by psychological illness can be considerably neglected, often left

    回复
  31. Vendelbo Melvin

    The lesson for each and every us strategy to to retain all of your we know what we can and can’t take overseas to countries we in order to visit, before we leave our own country. Most Western countries have government departments that provide information for citizens visting overseas areas. Read it.

    回复
  32. McKee Berman

    One method to stop on your own from eating after foods is always to remember to brush your the teeth right after every meal. Not simply will your pearly whites maintain their natural splendor, toothpaste can certainly make almost any food items appear to be unappetizing. Employing mouth wash can be

    回复
  33. Kara Paul

    HDMI may be the newest, fastest, sharpest car stereo connection on the market. Its the only cable the correct carry audio and video in one – never to mention, in high quality.To watch over the air TV signals, you need an antenna which includes most tuners. Some have a natural antenna while

    回复
  34. Hoff Armstrong

    Be mindful of the needs of prospects. As much as possible, memorize the vehicles owned on your clients. With this, doable ! offer them any services or services that is actually great for a rides. For example, in case client owns an off-road truck which he usually drives to countryside and back roads

    回复
  35. Michaelsen Keating

    To shed pounds, swap foods with enhanced carbs with unrefined carbs. Highly processed carbohydrates incorporate white-colored sugars and bright white loaves of bread, while unrefined carbohydrate food consist of natural/dark brown sweets and whole wheat breads. Highly processed carbohydrates take in

    回复
  36. York Zhang

    If you are looking for a casino with many slot machines, poker games, blackjack and craps games, then you should visit a reliable casino site. The aim of the casino is to make sure that they provide their customers with the best slots, roulette and poker games, blackjack games and other casino games

    回复
  37. Adkins Duffy

    He stuck an air bladder involving the door and car, pumped it up to pry the actual open a bit, then stuck a metal rod in regards to the door and car so he could hit the unlock button granting me access towards the car.Another key programmer truly worth trying is the HITAG-2 key tool packet

    回复

发表评论

邮箱地址不会被公开。