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

  1. Chapman Jenkins

    Do not be frightened to commit funds on promoting and marketing and advertising. It is uncomplicated to just intention on the portions and get fixated on how significantly advertising and promotion is costing you. Acquiring said that, it is vital to believe of the promotion as an expenditure in and

    回复
  2. Josephine Cook

    It is the best time to make a few plans for the longer term and it’s time to be happy.
    I have learn this submit and if I may just I want to counsel you some
    attention-grabbing issues or tips. Perhaps you could write next
    articles regarding this article. I desire to read even more issues approximately it!

    回复
  3. judi tembak ikan

    Howdy! This is kind of off topic but I need some advice from an established blog.
    Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about setting up my own but I’m not sure where to start.
    Do you have any tips or suggestions? Appreciate it

    回复
  4. Knapp Riggs

    Tip: Get narrowly defined niche markets where goods or service solves an upmarket need among the customers. Focus your marketing on them instead of trying to reach a broadly defined general market. You’ll generate more sales and enjoy a better return personal advertising extra expense.Use

    回复
  5. Macdonald Willard

    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

    回复
  6. Finley Husted

    If the first internet efforts haven’t turned up “the perfect one,” don’t despair. Any huge selection of new people sign up every day on the site, readers come in order to see Who’s New. You may additionally want look at expanding your searches–don’t be too intent on sticking back to your itemized c

    回复
  7. Hubbard Neergaard

    If you happen to be similar a well look at of man beings, you read pleasance in an salient movement render. About wholly populate likes to be diverted and movies in real time enjoying are consistently at your fingertips. Regardless if you wish repugnance flicks, first-class dramas, passionate comedi

    回复
  8. Skovbjerg Hartmann

    Your team is as unique because the way they play their sport. You don’t need to settle for ordinary when ordering uniforms for them. Get one of these custom design shop for a unique uniform that will make your team stick out from among other teams. You really can design team uniforms that best repre

    回复
  9. Hussain Borg

    You occur to be generating the most of Television just 1 night time time scanning by indicates of the reruns believing it seriously is worthless how compact little bit there is to consider pleasure in any lengthier when a wonderful movie trailer will come on. It can be all the matters you love – the

    回复
  10. Ebbesen Miranda

    Football, undoubtedly, functions a huge following all over the world. Sports fans from on the planet are usually recognized by the color of football shirt or by what emblem is printed on it. Wearing your favorite team’s jersey is a show of support to them. But have you ever wondered why having is ac

    回复
  11. Hesselberg Howard

    Soccer betting is really a game that’s very attractive and has a particular invest the hearts of the connoisseur. Agen Sbobet is probably the most trusted online gambling sites and trusted football bookies in Indonesia. Providing online slot gambling games and credit deposit gambling agents. Even th

    回复
  12. اموزش سرمایه گذاری

    Whats up very cool web site!! Guy .. Excellent .. Superb ..
    I will bookmark your website and take the feeds additionally?

    I’m satisfied to seek out so many useful information right here within the publish,
    we’d like develop more techniques in this regard, thanks for
    sharing. . . . . .

    回复
  13. porno

    Please let me know if you’re looking for a article author for your site.
    You have some really good posts and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back
    to mine. Please shoot me an email if interested.
    Cheers!

    回复
  14. Callahan Katz

    According to a study, animal skin was used to make clothing or devices from the Rock Age. Individuals frequently quest wild animals for food then use their skin to make accessories or clothing. Complete grain full natural leather is the natural leather on the same sort of skin that is not abraded or

    回复
  15. Outzen Ballard

    The Emperor Casino is an online poker room that offers players the chance to play games in a fun and safe environment. This has made it very popular with gamers and attracted new players who enjoy playing poker in a fun online setting. The atmosphere of the site is highly relaxing, and players are f

    回复
  16. Blom McDaniel

    When you devote in true estate, you could well want to make guaranteed you are in an spot that you genuinely can are living in. You never want to get real estate just to uncover out that you never like the region for the reason that then you happen to be heading to have to individual that residence

    回复
  17. srikandiqq

    Hi there are using WordPress for your blog platform? I’m new to the blog world
    but I’m trying to get started and set up my own. Do
    you need any html coding expertise to make your own blog?
    Any help would be really appreciated!

    回复
  18. Ware MacKenzie

    Well its a while. The try-outs and training camp are over and you’ve selected your football company. Now, as a youth football coach perform comes to shape and mould the group in your graphical. Remember you picked the team and activities . a reflection people and ultimately you will be the face of t

    回复
  19. gang earth

    I’ve been browsing online more than three hours today, yet I never found any interesting article like yours.
    It’s pretty worth enough for me. In my opinion,
    if all website owners and bloggers made good content as you did, the internet will be much more useful than ever before.

    回复
  20. Meyers Whitfield

    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

    回复
  21. Selena Clarkson

    I used to be suggested this website through my cousin. I’m no longer certain whether this
    submit is written via him as nobody else understand such distinctive approximately my trouble.
    You’re incredible! Thanks!

    回复
  22. Lawyer

    Hello, i think that i saw you visited my weblog so i came
    to “return the favor”.I am trying to find things to enhance my web site!I suppose its ok to
    use a few of your ideas!!

    回复
  23. Judyjek

    [url=https://bestnpills.com/]modafinil for sale us[/url] [url=https://drugstore555.com/]pharmacy online 365 discount code[/url] [url=https://azzmeds.com/]cost of tadalafil generic[/url] [url=https://yestablets.com/]lexapro price usa[/url] [url=https://npropills.com/]buy levitra 20 mg[/url] [url=https://effviagra.com/]buy viagra cheap online[/url] [url=https://pharmacyrp.com/]canadian pharmacy india[/url] [url=https://viagrazpt.com/]buy sildenafil online australia[/url] [url=https://ipillviagra.com/]canadian pharmacy viagra no prescription[/url] [url=https://atcialis.com/]cialis 5mg daily[/url]

    回复
  24. Rask Godwin

    The Internet has been largely given the task of spurring your own of sports betting. It is merely so simple connect together with a website and initiate placing bets. These websites are known as Sports books. Then, there are other websites consist of sports information special enthusiasts who have a

    回复
  25. MacKinnon Shore

    Yes, you should use the details without any fear. There are no security threats as the payment is processed through a secured portal. Moreover, your personal information is kept confidential and it could not be sold or rented a few third special day.Then merely place your bets and wait for

    回复
  26. Goodwin Levin

    If you pass to be comparable a tidy sum of man beings, you acquire satisfaction in an prominent motion picture. Basically every someone likes to be diverted and movies straightaway enjoying are ceaselessly at your fingertips. Irrespective if you foot stunned terrifying flicks, enceinte dramas, adumb

    回复
  27. party characters

    Thank you for every other informative site. Where else may I am
    getting that kind of info written in such a perfect method?
    I have a venture that I’m just now operating on, and I’ve been at the glance
    out for such info.

    回复
  28. Joseph Northern

    I have been browsing 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 internet will be much more
    useful than ever before.

    回复
  29. Frisk Skovsgaard

    Unless are generally counting cards (do not do this whilst playing online) and know the chances of the seller making a blackjack never take insurance coverage. When you take insurance home has large advantage which makes it not a thoughtful idea.It is very important to set yourself limits

    回复
  30. borther sister sex games

    However making that decision of which type of a player one would wish
    to be before they start will help them in taking different poker choices and periods simpler.
    Pay special attention during the end of the hand as a result of these are the
    decisions that can allow you to win. So,
    don’t make the fallacy of assuming each time you play you will win. The primary determination one should consider
    when beginning at poker is to determine, whether or not they
    need to play poker to win and earn a hefty earnings from the sport or
    are taking part in only for enjoyable. Nevertheless, note that playing poker
    for fun can also be utterly alright. To keep taking part in at a constantly profitable
    level, will require each effort and time or just put takes too much of work.
    After you have the beginning hand guidelines mastered and know the way they’ll change
    your place on the table, the following space to conquer is to work on enjoying for the remainder of the hand
    with equal vigor.

    можно увидеть здесь онлайн borther sister sex games

    回复
  31. Battle Rosa

    Now website visitor stays the top ten traits women find attractive in men as well as those that are the significant turnoff. Select one now be described as a lot simpler for you to get the art of seduction and attraction exact. Remember, learning how to attract women isn’t supposed to be memorizing

    回复
  32. Edith Dyer

    Hi there, i read your blog occasionally and i own a similar one and i was
    just curious if you get a lot of spam responses? If so how
    do you protect against it, any plugin or anything you can suggest?
    I get so much lately it’s driving me mad so any
    support is very much appreciated.

    回复
  33. Wind Shapiro

    Advertising and marketing and promoting will be essential to your achievement. Internet marketing is what generates your probable clients. Devoid of solid prospective customers, you are not going to uncover really fantastic bargains on homes. Consequently, if some factor is not accomplishing work in

    回复
  34. David Therkelsen

    Sony’s Transportable Playstation Player, or PSP, process delivers an awesome array of media to its potential buyers, with match titles, movement pics, and tunes out there. It is now doable to down load free of charge PSP motion pics suitable to your participant next paying just a a one-time payment.

    回复

发表评论

邮箱地址不会被公开。