当前位置:网站首页>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
边栏推荐
- Introduction of network security research direction of Shanghai Jiaotong University
- Shift EC20 mode and switch
- QQ group administrators
- Elevator dispatching (pairing project) ③
- Climb Phoenix Mountain on December 19, 2021
- 2021 annual summary - it seems that I have done everything except studying hard
- Heartbeat报错 attempted replay attack
- 1. Circular nesting and understanding of lists
- Understanding of object
- Properties and methods of OS Library
猜你喜欢
Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
Function parameters (positional parameters, default value parameters, variable parameters, named keyword parameters, keyword parameters)
JMeter correlation technology
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
Installation of ES plug-in in Google browser
Canoe: what is vtsystem
OSI model notes
Climb Phoenix Mountain on December 19, 2021
XMIND installation
F12 clear the cookies of the corresponding web address
随机推荐
Getting started with window functions
About the use of URL, href, SRC attributes
Solaris 10 network services
array_ The contains() function uses
Configure SSH key to realize login free
Locust learning record I
Global function Encyclopedia
Usage of with as
Canoe: distinguish VT, VN and vteststudio from their development history
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
Oracle11g | getting started with database. It's enough to read this 10000 word analysis
Elevator dispatching (pairing project) ③
Daemon xinted and logging syslogd
re. Sub() usage
51 data analysis post
Performance features focus & JMeter & LoadRunner advantages and disadvantages
Process communication and thread explanation
2020 Summary - Magic year, magic me
Install freeradius3 in the latest version of openwrt
Post man JSON script version conversion