如何设置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客户端》有107,983个想法

  1. McBride Archer

    Card สล็อต Games Review – Joker GamingJoker Gaming is an online poker room that has been around since 2021. The members all enjoy playing Poker and a lot of them have gained some really good skills at the game. They know when to hold their cards and what plays to make with their opponent

    回复
  2. Rodriguez Brogaard

    Casino games are fun and people love playing them- that’s why casino nights are usually used as fund raising events. Looked for goes for teens as well as grown-ups. The fact that a Casino night theme seems as a general very ‘sophisticated’ thing you want to do helps obtain the kids used your party a

    回复
  3. Dean Good

    Joker Gaming โจ๊กเกอร์ Review – A Look at This Newest Card GameJoker Gaming is one of the leaders in the football betting niche. They have been around since 2021 and are owned by the world’s leading football betting company, Interbet. In this article you will find out exactly why Joker i

    回复
  4. Shaffer Levin

    In order to explain the casino Effect Intending to describe two different situations that most of us have informed about our day. I will then show how the above situations connect to the bad boy/nice guy condition. Include give that you a solid involving what the Casino Effect is exactly why it work

    回复
  5. Denjek

    [url=https://xkeypills.com/]buy fluoxetine online without prescription[/url] [url=https://ddviagra.com/]soft viagra[/url] [url=https://pharmacyvpro.com/]pharmacy com[/url] [url=https://aolpharmacy.com/]reliable rx pharmacy[/url] [url=https://viagra21.com/]viagra pharmacy australia[/url]

    回复
  6. Bruce Smith

    How expansive is the system’s coverage? Motion detectors will activate the alarm when your house is entered by intruders. Factor . staple almost all quality home alarms. But what about the silent murderers? The best of the best offer services which detect leaking carbon monoxide, as well as heat lev

    回复
  7. Hardin Bass

    В Баку есть рестораны, где судя 4—5 залов же одновременно в каждом зале гуляют свадьбу. Вот, например, доходят к нам мемориев, заказывают одну лепешку на четверых, а там приходят — сразу десять брать. В Баку едят все, что из мяса, а там больше любят овощные салаты, например чобан-салат — он мощный о

    回复
  8. Mollerup Brink

    Do you would like to play free online casino slots but are afraid of the risk involved? Do not worry! You can now play Texas Holdem online free of charge, thanks to the internet. Actually, with simply just your smartphone or laptop, you’re now able to access online free casino slot machines where yo

    回复
  9. Einbauleiter|Poolbecken|Aufstellpool

    There isn’t anything like shopping online as far as selection and price are concerned. If you lack knowledge, online shopping can be dangerous. Keep reading the material that follows and get ready to become an online shopping expert.Whenever you shop online, be sure to make good use of dis

    回复
  10. Poolfolie|Poolabdeckung

    Shit for certain that when you take a purchase online, you are cognizant of if the website is batten down or non. You do not need your info existence compromised in this Day and years. Identity thievery is rather common, and you moldiness protect your selective information at whole price so that you

    回复
  11. đại sứ quán hanoi.gov.vn

    Hello there! This article couldn’t be written any better!
    Looking at this post reminds me of my previous roommate!
    He continually kept preaching about this. I am going to send
    this information to him. Pretty sure he will have a great
    read. I appreciate you for sharing!

    回复
  12. Hanna Washington

    The best way to hookup single people with real individuals on-line is to try using one of the best internet dating websites. There are lots of web sites which claim these are best, but there is however just one internet dating internet site containing consistently proven on its own. This online dati

    回复
  13. Ulrich Ross

    Is there an on line casino in Nevada? The small answer: No. Even so, online gambling in Nevada can be properly acceptable. But, unfortunately, online casino gaming isn’t yet regulated very harshly. Consequently, offshore casino websites will be the only safe choice.The “No” answer depends

    回复
  14. Dencker Hester

    Ready to select one of several writers? Deposit resources into your EssayShark equilibrium to make sure that a author can Focus on your purchase. Notice: You failed to basically shell out The author however!There is just one method through which you produce and post your fears. You can fin

    回复
  15. Aycock Spivey

    Then, you ought to consider close to process of installation. Just make sure that select those may easy set up so it is possible by your thoughts. Besides, you can choose items that could be installed with professional if you’re not sure relating to your ability.Get puppy – Though this one

    回复
  16. Bertram Astrup

    Following guides, you’ll see an index of functions cited that It’s also possible to get pleasure from. If you need more information on a particular variety of mistake, you have the ability to use the operates cited. Be decisive and uncover more about essay crafting for college. Enhance your producin

    回复
  17. Saleh Honeycutt

    About tax when you lose, they indicate it as itemized deductions and seem deducted in your own winnings. So it would considerably better merchandise in your articles will take care of your taxes and gaze after them on track. Listed under “other miscellaneous deductions”, you’re able to deduct up to

    回复
  18. Watson Salisbury

    After you submit your application to the casino, components . to look at your mailbox gone. Once you get their email, all you are going to it is open it, and then click towards the link that claims “Confirm”. Once that is done, you might be a person in the gambling enterprise.This ever tru

    回复
  19. Craft Little

    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

    回复
  20. Elliott Truelsen

    Roulette – this is probably a game of luck. The ancient Roulette wheel was designed by a mathematician in France. In this game the player assumes a number for the dog. Now the marble is rolled over and the playing social has to see if both point.So at this point you the wondering what Casi

    回复
  21. 먹튀

    We support the secure use of the particular Toto site by providing food verification and food info. -Toto DubaiIt absolutely was about two many years following your revival of the Toto marketplace that the food verification site began to appear. The greatest drawback of the personal Toto s

    回复
  22. Denjek

    [url=https://viagradx.com/]sildenafil 40 mg[/url] [url=https://555meds.com/]tadalafil 10 mg online[/url] [url=https://pharmacyrp.com/]canadian pharmacy service[/url] [url=https://xkeypills.com/]fluoxetine 10 mg prescription[/url] [url=https://cialiscap.com/]dapoxetine purchase[/url]

    回复
  23. Pauljek

    [url=https://atcialis.com/]cialis canada online pharmacy[/url] [url=https://cialisphm.com/]online cialis us[/url] [url=https://cialisget.com/]viagra cialis levitra[/url] [url=https://pharmacyrp.com/]which online pharmacy is reliable[/url] [url=https://yestablets.com/]generic for cipralex[/url]

    回复
  24. Romero Howell

    Masakan Khas Thailand Versi Shiro888 – Bukan hanya zona pariwisata yang menjadikan Negara Gajah Putih disukai oleh para turis, namun santapan khas Thailand pula diakui hendak kelezatannya.Masakan khas Thailand versi Shiro888 terdiri dari santapan serta minuman yang dimasak dengan metode khas or

    回复
  25. Henry Epstein

    Selama ini bisnis fashion masih menjadi salah satu bidang bisnis yang paling menguntungkan. Namun, ini tidak berarti bahwa tidak mudah untuk mendapatkan keuntungan dalam industri yang semakin kompetitif. Tidak hanya harus memiliki keterampilan desain yang andal dan dana yang cukup, tetapi setiap ora

    回复
  26. Earn money on short links

    Rather a several guys and ladies have no imagined how to make money by an on the web group. You, nevertheless, have happen to the excellent region to grasp. There are numerous concepts that will assistance you gain earnings on the world-wide-web. Use the recommendations in this report to help a grea

    回复
  27. 롤육성

    Thanks for some other magnificent article.

    The place else may anybody get that kind of info in such an ideal approach of writing?
    I’ve a presentation subsequent week, and I am on the search for
    such information.

    回复
  28. EARN MONEY SHORT LINK

    If you corresponding to pull, you Crataegus laevigata food market several of the pickings photos which you bring forth on the meshwork. In the rootage, you whitethorn need to publish your items on Craigslist or possibly a smaller sized site to catch the Holy Writ extinct to realize if work force and

    回复
  29. Randall Patterson

    Metode Menanggulangi Kekalahan Pada Judi Slot Online Shiro888 – Dalam sesuatu game tentu senantiasa hadapi yang namanya pasang surut yang maksudnya naik serta turun keadaan kamu dalam bermain. Terdapat perihal yang senantiasa sukses yang membuat kamu senantiasa naik dalam menanggulangi game, terdapa

    回复
  30. Beyer Gentry

    Require educational writing help? We are actually Doing the job from the academic creating marketplace for greater than seven years now, As well as in that point We’ve properly finished above 50,000 papers in varying subjects. Our essay creating services is truly trustworthy as we have the biggest g

    回复
  31. Merrill Finley

    Which casino do you would like to excursion? There are casino overnight tours available whatsoever of the area casinos. Actuality you prefer the one you need to go to and then plan your overnight holiday getaway. This is suitable for you and your significant other, for the people or as the girl’s pa

    回复

发表评论

邮箱地址不会被公开。