当前位置:网站首页>Establishment and use of SSL VPN (OpenVPN)
Establishment and use of SSL VPN (OpenVPN)
2022-06-23 17:59:01【Rokas. Yang】
One 、 Create Tencent cloud SSL VPN gateway
Protocol type selection SSL, Select to open the cloud VPC The Internet , Here's the picture :
Two 、 establish SSL Server side
At present, Tencent cloud supports SSL VPN The agreement is only UDP, Temporary does not support TCP; Fill in the local network segment as follows ( To get through VPC Network segment ) And peer network segment ( Client intranet segment ), Fill in the port 、 Authentication algorithm 、 Encryption algorithm and other information :
3、 ... and 、 establish SSL client
Select the server created in the previous step , Fill in the remarks and click OK :
Four 、 add to VPC route
When visiting from the cloud to the cloud , I'll look for VPC The routing table points to , Therefore, it is necessary to set the corresponding VPC Add a rule to the off cloud client network segment in the routing table , The next jump points to SSL VPN gateway .
On the private network console , Select the corresponding in the routing table VPC, Corresponding routing table :
After entering the routing table , Select the new routing policy :
To this cloud SSL VPN All operations have been completed .
5、 ... and 、SSL Configuration file download
openvpn yes Linux Open source pioneer under , It provides good performance and friendly users GUI, It is also officially recommended openvpn As ssl vpn Client side usage , The following will be shown in Windows、Debian、Centos How to configure... In the system openvpn client , The client configuration file is being created SSL It will be generated after the client , stay SSL Download the client page :
6、 ... and 、Windows To configure OpenVpn Client
1. Download and install
First of all to openvpn Official download page download openvpn connect( Be careful connect It's just openvpn client , Don't become a server ):
choice Windows This column , And click the Download that will do , If the download page cannot be opened by the wall , Can be found in This link download .
2. Configure and import
Install the option Import Profile, Import profile :
Unzip the configuration file , hold .ovpn Drag and drop the final configuration file :
3. Verify connectivity
Click... After importing connect
, And verify connectivity :
adopt route print
The command can be seen openvpn After normal operation , The route will be automatically distributed to the peer gateway , meanwhile ping Opposite end VPC Network segment connectivity is normal , There is inflow and outflow , It indicates that it has been opened normally . If ping No cloud vpc machine , Make sure the machine is not prohibited ping、 Security group 、acl The intranet segment of the client is normally released .
At this time to use wireshark Grab a bag and see , It can be found that when interacting with the peer intranet , It's actually the opposite end vpn Gateway interaction , Therefore, it also depends on the public network quality at both ends :
7、 ... and 、Debian/Centos To configure OpenVpn Client
1.Debian Install software source 、 Repository keys and openvpn client
Make sure Debian Support https transmission :
apt install apt-transport-https
install openvpn Official repository key :
curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
Install the software source corresponding to the system version code :
curl -fsSL https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-$DISTRO.list >/etc/apt/sources.list.d/openvpn3.list apt-get update
Officially supported release code :
Distribution version | edition | Code name ($DISTRO) | framework |
---|---|---|---|
Debian | 9 | stretch | amd64 |
Debian | 10 | buster | amd64,arm64* |
Debian | 11 | bullseye | amd64,arm64* |
Ubuntu | 18.04 | bionic | amd64, arm64* |
Ubuntu | 20.04 | focal | amd64,arm64* |
Ubuntu | 21.04 | hirsute | amd64, arm64* |
Here we use Debian9 stretch
As a demonstration , The same applies to other distributions , Therefore, the software source installation should be :
curl -fsSL https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-stretch.list >/etc/apt/sources.list.d/openvpn3.list apt-get update
Domestic machines due to GFW reason , The above software sources may not be available , Or limited by speed , You can refer to This article Set up a proxy server to use .
apt install openvpn3
2.Centos install openvpn client
Centos、Redhat The release code supported by the series :
Distribution version | edition | framework |
---|---|---|
Fedora | 33, 34, Rawhide (*2) | aarch64, s390x, x86_64 |
Red Hat Enterprise Linux / CentOS | 7 | x86_64 |
Red Hat Enterprise Linux / CentOS | 8 | aarch64, x86_64 |
install yum copr modular :
yum install yum-plugin-copr
Enable Copr The repository :
yum copr enable dsommers/openvpn3
install Openvpn client:
yum install openvpn3-client
3. Import the configuration file and run
From Tencent cloud SSL The configuration exported from the client console is uploaded to Debian, After decompression, run with the following command :
openvpn3 config-import --config ${MY_CONFIGURATION_FILE} # Import profile , So that subsequent sessions can reuse openvpn3 session-start --config ${MY_CONFIGURATION_FILE} # Open a session
sslvpnclient.ovpn Replace it with the correct one ovpn The configuration file , The configuration file name of Tencent cloud official website should be SSLVpnClientConfiguration.ovpn
, You can see connected Description connected .
Here we are openvpn It is running normally , Open another one tty Test connectivity :
4.openvpn session management
openvpn Allow multiple profiles and sessions to run simultaneously , You can manage the session by using the following command :
openvpn3 sesstions-list # View the list of currently running sessions
Restart the session :
openvpn3 session-manage --config ${CONFIGURATION_PROFILE_NAME} --restart
Disconnect session :
openvpn3 session-manage --session-path /net/openvpn/v3/sessions/..... --disconnect
After the session is disconnected, the traffic usage details will be counted .
View session status :
openvpn3 session-stats --config ${CONFIGURATION_PROFILE_NAME} openvpn3 session-stats --session-path /net/openvpn/v3/sessions/...
View the session log :
openvpn3 log --config ${CONFIGURATION_PROFILE_NAME}
Incidental PDF edition :
#SSLVPN Construction and use .pdf##SSLVPN Construction and use openvpn- Bright color plate .pdf#
边栏推荐
- 手机开户一般哪个证券公司好?在线开户安全么?
- Cross browser common events
- Tencent three sides: how to duplicate 4billion QQ numbers?
- Goframe framework: fast implementation of service end flow limiting Middleware
- What is the problem with TS File Error 404 when easynvr plays HLS protocol?
- [JS reverse hundred examples] pedata encryption information and zlib Application of gunzipsync()
- How code 39 check bits are calculated
- Listen attentively and give back sincerely! Pay tribute to the best product people!
- How to quickly obtain and analyze the housing price in your city?
- Petitpotam – NTLM relay to ad CS
猜你喜欢
Explanation of the principle and code implementation analysis of rainbow docking istio
Drawing black technology - easy to build a "real twin" 2D scene
How to make a shirt certificate
High availability solution practice of mongodb advanced applications (4)
Introduction to GTS Academy
Digital intelligent supply chain collaboration solution for new energy industry
How to create a three elimination game
The mail function is normal locally, and the ECS reports an error
POC about secureworks' recent azure Active Directory password brute force vulnerability
Similarities and differences between Chinese and American electronic signature SaaS
随机推荐
- Company offensive operation guide
- Go unit test
- Intelligent supply chain collaborative management solution for logistics industry
- PostgreSQL series articles -- the world's most advanced open source relational database
- Script to view the execution of SQLSERVER database stored procedures
- Transaction processing of cloud development database
- Skills that all applet developers should know: applying applet components
- ACM players take you to play with the array!
- Kotlin invoke convention makes kotlin code more concise
- January 5, 2022: there are four kinds of rhythms: AABB, ABAB and ABB
- Lighthouse open source application practice: o2oa
- . Net cloud native architect training camp (responsibility chain mode) -- learning notes
- Android kotlin exception handling
- Best practices cloud development cloudbase content audit capability
- The principle of MySQL index algorithm and the use of common indexes
- Goframe framework: graceful closing process
- Nanny level teaching! Take you to play with time complexity and space complexity!
- How to design a seckill system - geek course notes
- Method of copying web page content and automatically adding copyright information (compatible with ie, Firefox and chrome)
- [Hyperf]Entry “xxxInterface“ cannot be resolved: the class is not instantiable
- How to use JSON data format
- console. Log() is an asynchronous operation???
- Kdevtmpfsi processing of mining virus -- Practice
- Also using copy and paste to create test data, try the data assistant!
- Async/await
- Programmers are very useful ten tool websites, which are worth collecting
- Troubleshooting and modification process of easycvr interface dislocation in small screen
- Reinforcement learning series (I) -- basic concepts
- Easygbs playback screen is continuously loading. Troubleshooting
- 13. IP address and subnet partitioning (VLSM)
- 12. Manage network environment
- Illustration of mongodb cluster deployment principle (3)
- 6、VLAN
- What if the website is poisoned
- 7、VLAN-Trunk
- Revil - blackmail Virus Emergency Response
- How to make a badge
- Alien world, real presentation, how does the alien version of Pokemon go achieve?
- How to use R language to draw scatter diagram
- How to make validity table