Azure Firewall achieve SNAT

    SNAT below to see how to achieve, SNAT and DNAT configuration methods are not the same, DNAT can be configured directly on the FW, SNAT we can achieve by UDR, if you want all outbound traffic through FW, we can configure default by UDR export routes for the FW, so access to internet traffic would have to go the FW



    First look at the FW doing DNAT to rewrite the IP, from home computers to curl FW IP

    2.png


    In Nginx log where you can see the source IP would be the FW IP, that is to say in doing DNAT, FW will rewrite the request source IP

3.png


    If curl server's public IP

4.png


    Log in'll see the source IP is the client's public IP

5.png


    

    Region curl from each web server to the public network IP, comprising VNET VNET peer and the FW

Curl web server directly to the public network IP, see the source IP is a public server IP, the station explained that went directly internet, without FW, no SNAT


    Below to see how to configure SNAT, first create a UDR in each region

6.png


Add a default route to FW

8.png


    Associated with the respective subnet

9.png

    After trying to continue to curl from the VM to the web server, you will find FW traffic is rejected, because the rules do not allow outbound10.png



    This problem can be solved on the open network rules FW

11.png

 

    10.88 segment can curl www.baidu.com

    

    Not 88 segment will not do

13.png





    Add a network rule other segment again14.png



    Try to add a separate rule segment where linux214.png


    Try again, you can connect, DNAT simply realized

15.png




Guess you like

Origin blog.51cto.com/mxyit/2462253