Knowledge of snat, dnat, and loop

Source: Internet
Author: User

An understanding of snat, dnat, and loop is actually called snat. dnat modifies the source address and destination address of the data packet, and saves the ing relationship before and after the modification, perform restoration operations as needed. Snat: Change the source address (snat) when you go out, change the destination address (un_snat) dnat when you come in, and change the source address (un_dnat) when you go out) the so-called loop actually uses both snat and dnat, such as src 192.168.1.2 (client), dnat 10.14.11.177 (firewall), and dst 192.168.2.2 (HTTP Server, request 10.14.11.177 from src, then go to dst, and then perform the opposite operation. Finally, the src client receives the packet whose source is 10.14.11.177 and whose destination package is its own, so it will receive the packet correctly. The process is as follows: 1. first pre, convert the destination address, start 192.168.1.2-> 10.14.11.177, And then: 192.168.1.2-> 192.168.2.2 (pre) 2. then, convert the source address to the real http server. post: 192.168.1.2-> 192.168.2.2. After the conversion, 10.14.11.177 (post)-> 192.168.2.23. dst responds to the request and performs a pre inverse operation to convert the source address: 192.168.2.2-> 10.14.11.177. After the conversion, 10.14.11.177 (un_pre)-> 10.14.11.1774. perform the post operation and convert the destination address to un_post: 10.14.11.177-> 10.14.11.177. After the conversion, run 10.14.11.177-> 192.168.1.2 (un_post)

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.