github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/examples/alicloud-ecs-nat/README.md (about)

     1  ### Configure NAT instance Example
     2  
     3  In the Virtual Private Cloud(VPC) environment, to enable multiple back-end intranet hosts to provide services externally with a limited number of EIPs, map the ports on the EIP-bound host to the back-end intranet hosts.
     4  
     5  ### Get up and running
     6  
     7  * Planning phase
     8  
     9  		terraform plan 
    10  
    11  * Apply phase
    12  
    13  		terraform apply 
    14  		
    15  		Get the outputs:
    16  		+ nat_instance_eip_address = 123.56.19.238
    17  		+ nat_instance_private_ip = 10.1.1.57
    18  		+ worker_instance_private_ip = 10.1.1.56
    19  
    20  * Apply phase
    21  
    22          + login the vm: ssh root@123.56.19.238|Test123456
    23          + Run the "iptables -t nat -nvL" command to check the result
    24          
    25            | prot | in |   source    |  destination   |                          |
    26            | ---- | -- | ----------- | -------------- | ------------------------ |
    27            | tcp  | *  | 0.0.0.0/0   |  10.1.1.57     |  tcp dpt:80 to:10.1.1.56
    28            | all  | *  | 10.1.1.0/24 |  0.0.0.0/0     |  to:10.1.1.57
    29          
    30  
    31  * Destroy 
    32  
    33  		terraform destroy