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

  1. Mouridsen Fletcher

    Facebook or chitter is immediately among the outdo methods to promote your troupe on-melodic line. Numerous mountain of citizenry passim the universe use Facebook or myspace every Clarence Shepard Day Jr., granting you immense Numbers of reach with a sizable client root word. Since Facebook eve offe

    回复
  2. nancy yupoo

    Wire mesh belts can take on gentle or heavy loads. For such people, serpentine belts are extra helpful as these belts will be simply modified and changed manually with out the help of knowledgeable mechanic. Buckles with no “lock-for-the-latch” design are extra susceptible to inertial unlatching

    回复
  3. Desai Ismail

    Practice mixer media in guild to advertise your entanglement place. Inquiry differing populate at heart your grocery and send out them residential area messages, or even out ameliorate, try on this: perform a seek to your fundamental Book and root whatever questions citizenry rich person regarding t

    回复
  4. Mahmoud Sosa

    The net has transformed the encounter of advertising and marketing and internet marketing. There are now a breadth of options offered to any particular person seeking for a way to marketplace a answer or services. But how can you use the world-wide-web to its fullest? This article will share some ma

    回复
  5. Otis

    I think everything published made a great deal of sense.

    However, think about this, what if you were to write a awesome
    post title? I ain’t saying your information is not good., however
    suppose you added a post title that grabbed folk’s attention? I mean 如何设置IPSec VPN客户端 |
    Creekside Networks is a little boring. You could glance at Yahoo’s front page and see how they create news headlines to
    get viewers interested. You might add a video or a picture or two to get people interested about everything’ve got to say.
    Just my opinion, it could make your posts a little bit
    more interesting.

    Look at my blog post; this site (Otis)

    回复
  6. Kamp Hagen

    Linkonlearning charges the companies $99 along with the company resells the training for around $199. Please be serious-minded with these. Many of them don’t offer live trainer for in order to ask questions so, at the very least get help, and they don’t ask for proof of First Aid Training. You’ll ne

    回复
  7. Randolph Holgersen

    The chat room is not only fun it can be rewarding. There are chat games frequently such as; Screenshot Hunts and Trivia’s where players can win bonus money. All promotions along with a small playthrough, and there are many reasons why players should drop by the chat room to determine what’s going on

    回复
  8. Starr Otte

    Software included might be Microgaming, Cryptologic or Playtech to name a few. They all have all the different games. Considerable reliable and honest routines.Casino is not all about free dosh. Not because a game gives away free cash or bonuses means you should stick to the next game. Con

    回复
  9. Knudsen Horton

    So that you bathroom evaluate your net situation and finest encourage it on-agate line, setup a collecting of network site analytics equipment. These office tools will highlight what your audiences find at one time they value your internet site, hold back dog of what explore railway locomotive listi

    回复
  10. Stryhn Lyons

    To get a healthful body and mind, your body needs specific numbers of minerals and vitamins. Having a healthy diet plan filled up with various fruits, fresh vegetables along with other well balanced meals is an excellent begin. Even so, you may need vitamins dietary supplements to reached the advise

    回复
  11. McClanahan Santos

    The key premise of Internet promotion is to marketplace spot your items and companies on the internet. This report will present you a whole lot of solutions and tactics connected with effective Entire world-extensive-website internet marketing.On the web advertising and marketing and adver

    回复
  12. sbobet

    Spot on with this write-up, I seriously believe this web site needs a
    great deal more attention. I’ll probably be back again to
    see more, thanks for the advice!

    回复
  13. Frazier Head

    The online has altered the working experience of web marketing. There are now a breadth of choices accessible to any person seeking for a way to market a item or support. But how can you use the earth-large-world-wide-web to its fullest? This publishing will share some good tips that will assist you

    回复
  14. Mcmillan Hartley

    Are you interested to learn how you can watch Sky Sports live football streaming from the planet wide web? If you are a huge football fan like me, you won’t want to miss watching any live match of your favorite teams. With internet technology becoming so advanced, football matches can now be streame

    回复
  15. Boswell Haaning

    There can be a problem internet horse racing betting, alternatively. Some States, in order to protect their tax revenues produced from their State-run satellite betting and Off track Betting parlors, have blocked legal horse betting sites from access using State.If you might be a beginner,

    回复
  16. Snedker Vaughan

    IDN SLOT is a real cash online gambling site and Indonesian online slots. The latest slot gambling site that delivers various slot machine games or spin machines from typically the most popular providers in the world. These providers are pragmatic, habanero, playstar, ttg, isoftbet, cq9, microgaming

    回复
  17. Bjerg Coleman

    It may well seem like it is you in opposition to the globe in some conditions when it arrives to dealing with internet advertising and marketing. With the broad amount of info readily available on-line, it can be just about too much to handle at originally. This compose-up will source a great offer

    回复
  18. Campbell Gunter

    Avenger Casino is a new online casino that promises to deliver a safe and reliable play experience for all its members. The concept behind the Avenger Casino is to create a kind of home field advantage by allowing players who play at home to make their favorite gambling decisions in the comfort of t

    回复
  19. Jimenez Busk

    Economic occasions are usually hard, and if you’re not on your own if you’re feeling the effects regarding our economy on your particular pocketbook. Whilst financial troubles can be distressing together with worrying, they are not necessarily permanent. Listed below are guidelines to help show you

    回复
  20. Carroll Vincent

    Eu sou Patricia e tenho 33. Comecei este blog pelo motivo de acredito que o dado de propriedade deve ser divulgada. Moro em Alcântaras (CE) e me dedico, além da minha profissão Analista de Trade Marketing, à Coloring, Geocaching e Canoeing

    回复
  21. 10000 takipçi satın al

    I am extremely inspired along with your writing abilities and
    also with the structure for your weblog. Is
    this a paid subject matter or did you modify it your self?
    Either way stay up the nice quality writing, it’s uncommon to see a great weblog like this one these days..

    回复
  22. Ring Harrison

    A six-figure cash flow sounds great and that, undoubtedly, lures plenty connected with folks in to internet business traps, although it is not very realistic, at least, not right away. If you want to build a organization that generates money like that, you need to help originate from the ground floo

    回复
  23. ketamine hcl for sale

    Please let me know if you’re looking for a article writer
    for your weblog. You have some really great articles and I think
    I would be a good asset. If you ever want to take some of
    the load off, I’d love to write some material for your
    blog in exchange for a link back to mine. Please blast me an e-mail if interested.
    Many thanks!

    回复
  24. Nash Wiberg

    Be crucial. Know exactly what kind of car you want and exactly what you need to pay. Shop carefully first and research everything you can secure. The Internet is the most powerful research tool ever devised by man. Use it.Use preshave products with regard to soaps, lathers, creams and gels

    回复
  25. Kanstrup Lentz

    You’ve been seeking all day time for good suggestions about Internet advertising and marketing but have found little of use so much. It can be annoying with the amount involving unverified data out there. Pay close attention to help the tips given inside this article and anyone should find an abunda

    回复
  26. buy cialis

    You really make it seem so easy with your presentation but
    I find this matter to be actually something that I think I would never understand.

    It seems too complex and very broad for me.

    I’m looking forward for your next post, I will try
    to get the hang of it!

    回复
  27. Lehmann McGrath

    Write it down – results are highly powerful regarding information, which most online players and casino enthusiasts fail feel about. It’s amazing to see that by holding a diary, you can uncover pitfalls and events from your past ordeals. This information can help spot mistakes, it can also guarantee

    回复
  28. Webster Whalen

    After you an online account, get acquainted with the site’s interface by commencing to place small bets and can gather as much experience an individual can.This is basically legal and bookmakers don’t problem places because the two bets are placed with different bookmakers. It is the perfe

    回复
  29. Thomsen Nixon

    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

    回复
  30. Welsh Godwin

    Next, check the websites for any bonus codes. Before you can place your first bet, you will fund your bank account with the first deposit. The great news is, the event you add funds to your account, the operator will reward you with a special bonus. The bonus end up being offered for you in means. S

    回复
  31. Burnette Gram

    Taking a brief term view is an error most beginners make. You are judge the consequence of game dependent on the statistics of a single previous game or dependant upon an hour’s price movement on online sports texts. Betting is a long-term plan purpose it ought to be assessed has gone south long-ter

    回复
  32. Sandberg Mcguire

    Write it down – results tend to be powerful bits of information, which most online players and casino enthusiasts fail feel. It’s amazing to see that by holding a diary, you can uncover pitfalls and events from your past is afflicted with. This information can help spot mistakes, it can also guarant

    回复
  33. Immigration Lawyer Nevada

    Paperwork is processed on a first-come, first-served foundation, so new applications could go untouched for a number of months. To address the difficulty of gradual processing occasions, USCIS has made a policy allowing applicants to submit the I-130 and I-485 forms on the similar time. Another dela

    回复
  34. Short Ulrich

    Most on the popups view coming up while surfing the internet could have some ills concealed in your kids. Some of them might are usually programmed to monitor information of web browsers. The only way you can solve issue as an e-casino online player is to dam the pop up. The good thing is that you d

    回复
  35. Bidstrup Kara

    People lose their assets because create a mistake to bet using extremely money. If you hope to go into sports betting online, you need to treat it as an capital. Only use the money that are able to afford to shed. If you want to take online betting seriously, consider opening a separate bank account

    回复
  36. Pingback引用通告: Do You Have What It Takes Backlink Like A True Expert? - Leaseback

  37. Lundgaard Feldman

    Me chamo Paulo e tenho prazer de ser o autor desse blog. Gosto muito LARPing e já estudo este tema há diversos 9. Aprecio uma discussão de boteco e faço mais citações de Psych do que deveria e vivo em Abadia de Goiás (GO).

    回复
  38. Finch Crockett

    Purchase your free $2 Powerball play ticket in any participating ticket retailer. Select your numbers with a paper playlist or create a digital my Playslip on your pc. For instant random number selections, request an instant Pick.multiplied Non-jackpot prizes by the amount of Powerball com

    回复
  39. Bates Demir

    Football is indeed, one of the most popular games in globe right this time. Without a doubt, this sport has made a massive following around earth. In some countries, football Sundays is surely a important situation. It can even be as essential as following a religion.This satellite tv for

    回复
  40. Lindsay Sivertsen

    With online gambling, any player can always access their preferred online casino in if and anywhere they demand. And because it is accessible, players can be at the great risks getting addicted to gambling. This addiction can be purchased not only in playing in online casinos but also in land-based

    回复
  41. Luna Bruus

    You already know that unless you eat well, your body does not feel great. It’s just as important as doing exercises, that you likely know exactly about way too. Read this useful post about nutritional vitamins.Nutritional supplements are an easy way to avoid getting older and retain that v

    回复

发表评论

邮箱地址不会被公开。