How to build a cross-network monitoring environment with stun protocol

Source: Internet
Author: User

Previously mentioned the LAN video monitoring environment, then how to expand the LAN environment to the public network environment. The stun protocol is a good solution.

If you want to use the LAN's video server as a public network server, you must map the streaming media server of the LAN to the public network environment. But most of the cases, your LAN router is not allowed, only allowed out, that is, if you do not hit the "wall", you will not be able to use the LAN streaming media server as a public network streaming media server. The effect of the stun protocol is to get the channel through.

Stun implementation principle: First, the public network stun server must have dual network card, for data exchange. Streaming media server display as a client, through the LAN IP to the public network STUN server to send STUN packets, STUN server received from the local area network streaming media server sent packets, will send a feedback to the port sent over, if the streaming media server can receive this feedback, It means that two-way communication has been established successfully, which can be used for public network access by the streaming media server of LAN.


From the effect of monitoring software display feedback, the quality is barely possible. Note that the IP address of the test end is 192.168.1.13 and the IP address of the streaming media server is 17.1.2.2. As for why streaming media data is transmitted between 53 and 13, that is the role of the stun protocol. When stun the tunnel through, in fact, LAN streaming media server network segment of the router into an external server, access to a router of a stun hit the port, the router will directly from the streaming media server's corresponding port data sent out.

Test software from: https://code.google.com/p/teaonly-projects/(not open source, test version), grab kits for Wireshark. If you use the mobile phone's tcpdump tool to carry on the analysis of the handset, it is more convenient to understand (UDP and stun packets between the 17.1.2.2 and 192.168.1.53 transmission.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.