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

  1. Dillon Gentry

    Contemporary: Like modern day architecture, the contemporary style is a composition of asymmetrical lines and geometrical design. The theory is very sleek and modern with very less ornamentation. These styles aren’t necessarily associated with wood; in fact man-made materials are much preferred.<br/

    回复
  2. Caspersen Gutierrez

    게임위가 압수 보관하고 있는 불법 도박장 게임기기들* 바다이야기 ‘잔당’들은 아직도 활동 중게임심의법 개정이 골치아픈 이유는 바다이야기가 현재진행형이기 때문입니다.도박에 빠진 사람의 욕망은 끝이 없고, 욕망을 판매해 돈을 벌기 위한 세력 역시 끊임없이 나오기 마련입니다. 기술이 발전하다 보니 불법도 온라인과 오프라인을 넘나듭니다. 다채로운 변종 도박장이 ‘게임장’, ‘게임랜드’ 등의 간판을 달고 게임사업의 탈을 쓴 채 어느 한 구석에서 운영되고 있죠.현

    回复
  3. Humphries Dreier

    Tony RobbinsThe Internet has actually made a lot of things possible, including on the internet education and learning. The goal as well as intent of this blog site was simply to give individuals with the chance to check out a Tony Robbins trip as well as obtain any understandings they may

    回复
  4. Overgaard Marshall

    Try and giving up smoking using the approach that is easiest for your needs. Will not consider quitting the cold poultry way. Statistically, individuals who attempt cold poultry fall short 95Percent of the time. Since smoking is indeed obsessive, it is advisable to wean yourself off. Utilizing these

    回复
  5. Barry Solomon

    Quitting weed on an everlasting basis requires your full commitment. Setting a quit date help you to you removed up basic primary goal of quitting marijuana cravings. The quit date should begin now without having it until you finish with your last batch of dandelion. It’s not for you to work a perso

    回复
  6. best online gambling sites

    I was wondering if you ever considered changing the layout of your site?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or 2 images.

    Maybe you could space it out better?

    回复
  7. Curtis Crane

    크레이지슬롯의 스피드바카라은 지난달 전체 NCAA 축구 토너먼트를 주최하면서 거의 기록적인 주가로 반등했습니다. 크레이지슬롯 게임위원회가 월요일 발표 한 데이터에 따르면 9월에 알트벳 카지노에서 스포츠 이벤트에 3억 7000만 달러가 베팅 되었고 주로 아이스하키에 모바일 살롱바카라 애플리케이션을 통해 베팅 했습니다.이는 10월에 세운 월간 스피드바카라 기록인 1억 1000만 달러에 미치지 못했지만, 2019 년 8월에 다이아몬드7카지노 최초의 합법적인 스포츠 배팅이 이루어진 이후 두 번째로 높은 월간 핸들로 순위를

    回复
  8. Heller Bossen

    Are you a partizan of YouTube? If you enjoy in observing exhaustively unloose films on the vane, from a total of unparalleled groups, you power be a tumid garter of YouTube. Dozens of site customers only position videos on YouTube, on that point are a raft of who also issue their soul YouTube films.

    回复
  9. Friis Love

    To aid in smoking cessation, take away your self out of your circle of buddies who smoke. Don’t worry this is just a short-term measure, but you absolutely should do this. Continuous contact with cigarette smoke, as well as the societal part of smoking with each other, will immediately squash your h

    回复
  10. Power Gram

    Through time, it might lose its natural red luster as constantly changing temperatures with the cooking. RTA cabinets are not cheap in order to substandard methods. First impressions will always important (i.e.There’s no other way to put it, the most of homes could figure to undergo a major re-

    回复
  11. samp

    Greate post. Keep writing such kind of info on your page.

    Im really impressed by it.
    Hello there, You’ve done a great job. I’ll certainly
    digg it and individually recommend to my friends.
    I am confident they’ll be benefited from this website.

    回复
  12. Jernigan English

    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

    回复
  13. Richmond Falkenberg

    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

    回复
  14. Markjek

    [url=https://cialisvm.com/]order cheap cialis[/url] [url=https://lacialis.com/]tadalafil from canada[/url] [url=https://cialisdi.com/]tadalafil india buy online[/url] [url=https://cialisprem.com/]40 mg generic cialis[/url]

    回复
  15. Purcell Booth

    French Antique Glaze – if to watch out for kitchen cabinet that will help you stress the eu vibe in your kitchen then French Antique Glaze is perfectly for you. If you’re thinking that custom made is simply answer in your problem nevertheless, you don’t have much budget again French Antique Glaze is

    回复
  16. Birk Kaya

    If you’re succeeding on your quit smoking trip, don’t neglect to treat yourself. Treat yourself to a great massage therapy, a pedicure, or perhaps a special new clothing when you’ve scale back, and then something else when you’ve halted fully. You need to have advantages like this to enjoy, as they

    回复
  17. Gram Reese

    bandar slot online terpercaya sekarang ini lagi banyak dicari oleh beberapa pencinta judi online karena permainan slots sekarang ini sedang hot atau meledak dilapisan pencinta judi online karena bermainnya yang lumayan menarik dapat hilangkan rasa jemu saat mainkan mesin permainan jekpot atau mesin

    回复
  18. Brandstrup Chavez

    Shaker style kitchen cabinets are more for those who like contemporary or traditional looks. Shaker offers simplicity offers a conservative planned arrival. You will feel right in your own home if market or topic . something throughout country and contemporary. Couldn’t like both styles and with Sha

    回复
  19. Markjek

    [url=https://fnnpharm.com/]buy tadalafil usa online[/url] [url=https://cialisnsr.com/]buy genuine priligy[/url] [url=https://yestablets.com/]lexapro brand name discount[/url] [url=https://nfshealth.com/]amoxicillin cost india[/url] [url=https://npropills.com/]levitra australia[/url] [url=https://lmopharm.com/]augmentin 1000 mg 62.5 mg[/url] [url=https://iviagracialislevitra.com/]tadalafil cheap[/url]

    回复
  20. 1xbet app

    Hello There. I found your blog using msn. This is an extremely well written article.
    I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post.
    I will certainly return.

    回复
  21. Funder Langballe

    But the journey have proven to be shelves to cabinets is has been long. Some of such accessories include the hangers, locks and holders and may more. Back Splashes: This spot that you will really fiddle with.The kitchen will be the heart of the house, so its design is integral. It’s more than j

    回复
  22. Nguyen Vang

    Do you possess an irritating close friend who enjoys to exhibit his football abilities? Are you currently fed up with becoming one of several worst soccer gamers? Fortunately, you do not have to go through any more. By reading this article write-up, you are able to increase your expertise to help yo

    回复
  23. Lynggaard Bruce

    Change your profile picture and greeting occasionally, add photos for your own photo album, and login regularly–this will not only provide you noticed, but it will help others obtain a more varied and up-to-date idea with the constitutes negative aspect you.As a webmaster, protecting your

    回复
  24. Houghton Daugherty

    The Wind Creek Bethlehem (renamed Sands Casino Bethlehem) is a highly regarded casino resort located within the Bethlehem Works area of east Pennsylvania, in the state of Bethlehem, Pennsylvania, in northern Pennsylvania, also in the United States. The location and proximity to the world famous Amis

    回复
  25. Alstrup Mullins

    If you desire to be the better football gamer you can come to be, then you are looking at the correct article. There exists surely a lot to understand and learn, and no subject your level of skill, you’re heading to learn some good information on this page. Keep reading so that you can to display ne

    回复
  26. Valentine Watson

    Sembilan poin berasal dari jarak aman sesungguhnya bukan misi yang ringan untuk dituntaskan Chievo Verona, tapi secara matematis, tetap tersedia peluang bagi Gialoblu untuk mampu terhindar berasal dari jurang degradasi di akhir musim nanti. Mereka cuma kudu ulang ke jalan yang benar dan raih kemenan

    回复
  27. Warming Berntsen

    Often folks think they may stop smoking cigarettes by switching to your product or service for example biting-cigarette. This isn’t a good idea since usually biting-smoking cigarettes consists of a lot more nicotine. You could wind up just changing one particular dependence for the next. If you trul

    回复
  28. Filtenborg Haastrup

    Contemporary. This style emphasizes a clean and futuristic looks. The materials often use within this style are stainless steel, granite and marble, and man made countertop materials, which provides for a sophisticated look of your kitchen. It features top-line appliances and expensive fixtures and

    回复
  29. Herring Buckner

    It is very important approach your trip by centering on a single day at one time. Quitting can be a method. Will not be concerned about how you might manage until the following month, or the 12 months right after. Go through it 1 day at one time, just ridding yourself of the smoking in the short ter

    回复
  30. Snyder Andreassen

    Do you have an frustrating good friend who wants to exhibit his soccer skills? Are you currently fed up with becoming among the most detrimental football players? Thankfully, you do not have to go through any longer. By looking over this write-up, it is possible to increase your expertise so that yo

    回复
  31. Gade McCallum

    If you are searching for dating advice, the world wide web can be your companion. Online dating services solutions are getting to be extremely popular recently. Many singles search the web to get like-minded people that share their hobbies, interests, and personal lives. For a lot of single men and

    回复
  32. Haugaard Nicolaisen

    It appears as if every other individual is giving online dating assistance to solitary people online. In fact, you may have come across lots of it previously. Internet dating sites, conversation rooms, internet dating guides, assistance posts-it appears to be just like all of us have their opinion a

    回复
  33. Mathis Krogsgaard

    If your appliance garage is built like this, and you install the uppers first, so the bases, you really need to tear down the uppers discover countertops in, and REINSTALL the uppers that it affected. This is the total waste of time.People decide to make their own cabinets for many reasons

    回复
  34. Bruce Hong

    When you have chosen to give up smoking, emotionally get ready for what’s ahead. Try out to focus on the fact that you can cease, which this may not be a hopeless dream. Set an established “cease particular date” and even attempt to add it to the schedule. By taking this kind of optimistic strategy,

    回复
  35. Christoffersen Clapp

    Should you be looking to get a chemical aid to give up smoking cigarettes, then use caution regarding this method. Drugs including Chantix have a relatively poor effectiveness and will have the possibility to cause serious damage to your body. It operates by adjusting the human brain biochemistry, a

    回复
  36. Meredith Greene

    The Joy Of Playing โจ๊กเกอร์ Joker GamesYou may have heard of Joker Gaming as an expert in football games. They have a variety of offerings, including Fantasy Manager, Jack the Ripper, Mafia Wars, and more. Their specialty is their expertise in providing quality football games โจ๊กเกอร์,

    回复
  37. MacKay Desai

    Raging Rhino Week – 1/3 : MAX BET & BIG WIN Slot Machine Added bonus Circle Free Games plus SUBSTANTIAL RETRIGGERS – 동영상 This result in some sort of mobile-pleasant consumer passage point, in a number of on-line casino video games which might be played on Smartphone’s and even in particular promotio

    回复

发表评论

邮箱地址不会被公开。