当前位置:网站首页>Alibaba cloud server connection intranet operation
Alibaba cloud server connection intranet operation
2022-07-04 11:20:00 【Ascetic monk runnercai】
background :
The customer requires to be able to access from the web page of the external network web Control Center .
Introduce :
Applied for an Alibaba cloud server , In fact, there is a trial version for the first time , After applying for the server , The server will assign you an external network IP, The specific links : Alibaba cloud
After applying, you can see it on the workbench :
Then go to the security group to open the port configuration : Configure the port to be accessed .
At this time, we use the intranet ( Access to the Internet IP) Login on your computer :
ssh [email protected]
Input password
Then you can log in to ECS .
But at this time, we can only access ECs from the Intranet in the form of a client , So when we deploy one on the cloud server web Program , And this program needs to access data from our intranet , Now what? ?
It's time to frp agent ( Intranet through ) 了 .
See below for details :
Blog 1
Blog 2
The two blogs are very detailed , Let me add here :
Alibaba cloud server settings frp The service side , Your own computer is set to frp The client of , Because ECS cannot actively establish a connection with your intranet computer , Only computers on the Intranet can actively connect to Alibaba cloud servers , So here is this configuration .
Alibaba cloud server frp The configuration is as follows :
[common] # Common configuration , This configuration is required ( Do not modify the agent name )
bind_port = 7000 # frps Listening port
Remember to add this port to the ECS .
in other words frp The server of this program is set on the ECS , This frp The port of the server is 7000, Then start
At this time, you use it on your computer :
telnet Alibaba cloud server address 7000
It can be connected .
Then set it in the computer in your intranet frp Client configuration of the program :
#
[common]
server_addr = 120.76.118.232 # Alibaba cloud server address
server_port = 7000 # Aliyun server frp The port of the server , On your side frp The client of should connect to this port , Acting from here
# The following is the port and address of the proxy
# Alibaba cloud server passes 7000 Port as proxy forwarding
# For example, if you visit Alibaba cloud server curl -o h.html http://127.0.0.1:6001
# At this time, Alibaba cloud server passes frp agent , Log in to the intranet computer indirectly , To visit
#http://172.0.8.21:9990, It is equivalent to intranet computer intranet frp Client to access http://172.0.8.21:9990, And then the result
# Forward to Alibaba cloud server frp Server side , Finally, Alibaba cloud server frp Return the result to the person who actually accesses Alibaba cloud server
# In a big circle , Finally, Alibaba cloud servers can access a server in the intranet
[web0]
type = tcp
local_ip = 127.0.0.1
local_port = 9990
remote_port = 6000
[web1]
type = tcp
local_ip = 192.168.1.25 # An internal in the intranet ip
local_port = 9990
remote_port = 6001
[web2]
type = tcp
local_ip = 127.0.0.1
local_port = 1935
remote_port = 6002
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 1935
remote_port = 6003
If you want to access 22, Then input
ssh -p 6006 Intranet host user name @ Cloud server ip
When entering the password, be sure to enter the password in the intranet , Although it prompts you to enter the Alibaba cloud native password
Say it again :
Someone accesses Alibaba cloud server :
http:// Alibaba cloud server extranet ip:6001
Its link is as follows
Aliyun server frp Server side —》 Intranet computer frp client —》192.168.1.25:9000
Then follow the same route back
This method is suitable for all kinds of audio and video streams , such as rtsp rtmp http-flv etc.
Reference resources :NAT Router holing principle
https://www.cnblogs.com/mq0036/p/4644776.html
边栏推荐
- Deepmind proposed a Zuan AI, which specially outputs network attack language
- R built in data set
- CAPL: on sysVar_ Update difference on sysvar
- Swagger and OpenAPI
- Global function Encyclopedia
- JMeter correlation technology
- First article
- QQ get group member operation time
- Test question bank management system - database design [easy to understand]
- Canoe: the difference between environment variables and system variables
猜你喜欢
QQ group collection
Canoe - the second simulation engineering - xvehicle - 2 panel design (operation)
QQ group administrators
Fundamentals of software testing
os. Path built-in module
2021 annual summary - it seems that I have done everything except studying hard
Day01 preliminary packet capture
2020 Summary - Magic year, magic me
Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
Canoe test: two ways to create CAPL test module
随机推荐
Usage of with as
SSH原理和公钥认证
Common tips
For and while loops
SSH principle and public key authentication
Some tips on learning database
Iterator generators and modules
QQ group collection
试题库管理系统–数据库设计[通俗易懂]
JMeter common configuration components and parameterization
Notes on writing test points in mind mapping
Application of slice
Introduction of network security research direction of Shanghai Jiaotong University
三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
Object. Assign () & JS (= >) arrow function & foreach () function
About the use of URL, href, SRC attributes
QQ one click cookie acquisition
2018 meisai modeling summary +latex standard meisai template sharing
Canoe - the third simulation project - bus simulation - 2 function introduction, network topology
Is Sanli futures safe? How to open a futures account? How to reduce the handling charge of futures at present?