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

  1. McCain Gibson

    How to Systematically Generate income Achieving an end is in most cases easier than we make certain it is. But there is something about being human which us over-complicat what must be pretty primary. In the making money online arena, this couldn’t be more obvious.I operate one website rel

    回复
  2. Achtformbecken|Aufstellpool|Achtformbecken

    When shopping online, pick away the Charlemagne Herbert Outflank transport insurance. Many generation companies pass by expedited merchant vessels. However, many times getting the merchandise unmatched daytime earlier terminate buoy price you as a great deal as duplicate the rule transport impairmen

    回复
  3. Flor Alngindabu

    I’ve been surfing on-line more than 3 hours nowadays,
    but I by no means discovered any attention-grabbing article
    like yours. It’s beautiful value sufficient for me.
    Personally, if all web owners and bloggers made excellent content as you did, the internet can be much more useful than ever before.

    回复
  4. Tobiasen Sampson

    The Sands Casino and Hotel were an amazing historic landmark in Las Vegas, Nevada, the first major American hotel and gambling complex on the Las Vegas Strip. Designed by the celebrated architect Wayne McAllister, the Sands quickly became the seventh casino to open along the famous Strip. In its fir

    回复
  5. solicitor

    Do you have a spam problem on this blog; I also am a blogger, and I was wondering your situation; many of us have created
    some nice practices and we are looking to swap strategies with other folks,
    please shoot me an email if interested.

    回复
  6. aooko taobao

    Occasionally, trend means wearing outfits with coordinating shades. Other times, it indicates several hours inside the bathroom setting up yourself to get a big day. There is no time in your life where you can not help save a few minutes together with the proper style ideas and concepts. Keep readin

    回复
  7. Gutierrez Lyng

    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

    回复
  8. instagram takipçi satın al

    Social media is a great new trend in today’s society. There are thousands of new Facebook and Twitter accounts created every day. Since businesses are noticing this, you should take note as well. In the following article we will share some amazing marketing tips and advice that will put you on the s

    回复
  9. Ohlsen King

    This is the ONLY government-authorized website a person can check out request this particular. They don’t send you emails requesting information or place pop-ups on other websites, and, if observe one of those, it is probably for real and/or an incidence of “phishing”.someone striving to get your id

    回复
  10. Pauljek

    [url=https://feviagra.com/]buy viagra 25mg[/url] [url=https://dbcialis.com/]cialis mexico online[/url] [url=https://cialistrust.com/]average cost cialis 5mg[/url] [url=https://cialiscentre.com/]buying cialis[/url] [url=https://viagrabed.com/]viagra generics[/url]

    回复
  11. Used Car - Bad Credit Buying Tips|Google Adwords - Direct Linking Or Landing Page?|Home Based Business Advice|Forex Trading - Twenty Interest Rates Directly Customise The Value Of Usd|How To Approach Girls Directly - Inner Game Problems

    Learning how to approach a woman directly is really hard for lots of guys. Lots of guys have trouble with their inner business. Used Car – Bad Credit Buying Tips of the cool things about direct game simple fact that it helps you

    回复
  12. Japan Sex Tube Online

    Hi, I do think this is a great web site. I stumbledupon it 😉 I’m going to revisit once again since I saved as a
    favorite it. Money and freedom is the greatest way
    to change, may you be rich and continue to guide others.

    回复
  13. Alvarado Greenwood

    The respected professional business services and analyst company Ernst and Small had encouraging news for the online gambling industry this week ? it may be among the economic sectors that happens of the global economical recession stronger and much more resilient than ever before.Ernst & Young has

    回复
  14. Gibson Bruun

    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

    回复
  15. instagram takipçi satın al

    If you’ve been looking for a way to take your business to the next level, social media marketing may be what you are looking for. It is a way to connect with your customers and clients in a technologically savvy world and still maintain the ease and simplicity of use that you are looking for.<b

    回复
  16. instagram takipçi satın al

    Social media marketing can effectively drive more and more customers to your business, when you know how to use it properly. This kind of marketing can even help businesses that are doing well already. You will find a variety of tips in this article to benefit your quest to grow your business enterp

    回复
  17. website

    Hi there would you mind lettting me know which hosting company you’re utilizing?
    I’ve loaded your blog in 3 difcerent internet browsers and I must say thuis blog loads a lot fasdter then most.
    Can you suggest a good hosting provider at a honst price?
    Thanks, I appreciate it!
    website

    回复
  18. Moreno Ruiz

    In other words, moment original capital raising back associated with your the trade and bank it. Then can encourage the rest ride, and never take a loss of profits. If you’re holding a significant profit, you may want to take a larger portion out for this trade defend some of one’s gains.I

    回复
  19. Sarkodie

    A fantastic hint to take into account when you’re thinking about getting audio is always to preview a full album when you obtain it. It’s never a smart idea to acquire a whole album if you’ve only heard a single tune off of it. You possibly will not like the relaxation it.A great hint to u

    回复
  20. Mays Walters

    Create your page content by writing ten or higher paragraphs. Each paragraph can be just several sentences long or longer if you’d like. Write your page content as in order to how would certainly speak it in normal conversation as possible. Google and all optimum engines use a natural text algorithm

    回复
  21. gyakie|Stonebwoy|Stonebwoy

    An excellent idea to take into account when you’re installing music is always to organize the background music you acquire right into a nice directory. You don’t desire to get rid of some of the music that you simply ordered and bought. It’s important that you have it all organized to enable you to

    回复
  22. 바다이야기

    게임중독 프레임을 굳히게 된 결정적 계기이기도 합니다. 게임중독 약물 치료를 주장하고 질병코드 등재에 찬성하는 단체에서 바다이야기 시기의 논리는 아직도 가끔씩 등장합니다. 연구 자료 근거 중 도박형 게임을 일반 게임 분류와 혼재시켜 답을 도출한 사례도 상당수 존재합니다.우리나라 게임 심의는 세계적 기준에서 관대하다고 평가받습니다. 특히 선정성은 청소년 이용불가를 달면 통과되는 분위기고, 폭력성도 팍팍하게 잡는 편은 아닙니다. 그런데 단 하나, 사행성 심의는 세계 주요 국가 중 단연 가장 엄격합니다. 굳이 넘어가도 될 부분까

    回复
  23. Pallesen Shea

    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

    回复
  24. Campos Vedel

    The Profit Lance System is done within a professional way full data. Some beginners have suggested which get information over load. Just remember to do things a measure at an occasion. Build those snow balls of income step by step. And constantly have in the back of your mind that Rome was not built

    回复
  25. 7colourx.com

    You can certainly see your skills within the
    article you write. The world hopes for even more passionate writers like you who aren’t afraid to say
    how they believe. At all times go after your heart.

    回复
  26. gyakie

    An excellent tip to think about when you’re planning to acquire audio is going to be entirely sure that you’re accessing the best model of whatever it is you want. You might want something particular, maybe the radio station model of your tune. It can be hard to successfully download exactly what yo

    回复
  27. Jasonjek

    [url=http://tadcialis.com/]cialis 5mg uk[/url] [url=http://colchicinepill.com/]colchicine prescription cost[/url] [url=http://mebendazolevermox.com/]vermox us[/url] [url=http://nexiumesomeprazol.com/]nexium 7 coupon[/url] [url=http://tbbviagra.com/]how to get viagra in mexico[/url] [url=http://atviagra.com/]viagra 50mg for sale[/url] [url=http://extpharmacy.com/]southern pharmacy[/url] [url=http://cialiscentre.com/]cialis capsules online[/url] [url=http://viagranrx.com/]generic viagra online free shipping[/url] [url=http://cialiskb.com/]online pharmacy cialis india[/url]

    回复
  28. Ghana songs download

    An excellent tip to take into consideration when you’re thinking about accessing tunes is to review a complete record before you decide to obtain it. It’s never ever smart to buy a complete record if you’ve only heard one music from it. You will possibly not much like the rest it.A single

    回复
  29. Helms Aguirre

    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

    回复
  30. "fuck video"

    My brother suggested I might like this website.
    He was totally right. This put up truly made my day. You
    cann’t consider just how a lot time I had spent for this info!
    Thank you!

    回复
  31. Popular Paint Effects For Home Interiors|Best Strategies For Controlling Anger|Stretch Marks - The Right Way To Apply Vitamin E Antioxidant Directly On Stretch Marks|Create Gorgeous, Professional-Looking Portraits At Home Using Window Light

    Currently, free ringtones sent directly to your cell phone such as monophonic tones (consisting of one’s single melodic line), polyphonic tones (having two perhaps more harmonically related melodic parts sounding together), song ringtones, voice tones, and true tones can be found for free mostly pay

    回复
  32. Andreasen Bugge

    Among undoubtedly the most commonplace good great reasons to re-mortgage is reduce monthly installments than you need to do now. Should you be struggling purchase to to your monthly installments, you then ought to adopt into consideration a better option, just as easily as specialists . easily. When

    回复
  33. Eyejek

    [url=http://ffppharm.com/]can you buy clomid over the counter uk[/url] [url=http://aicialis.com/]buy cialis online fast delivery[/url] [url=http://tnspills.com/]provigil online canada[/url] [url=http://viagradpn.com/]generic viagra online canadian[/url] [url=http://viagrawrp.com/]viagra professional pfizer[/url] [url=http://ernviagra.com/]generic viagra effective[/url] [url=http://tbbviagra.com/]viagra gel for sale[/url] [url=http://cialismoz.com/]cialis brand 10mg[/url] [url=http://viagrapmed.com/]generic viagra online united states[/url] [url=http://feviagra.com/]female viagra pills in india[/url]

    回复

发表评论

邮箱地址不会被公开。