This module allows you to manage the network address translation (NAT) rules. In the following example, we are asking all traffic that hits port 2222 on the public IP address of 123.123.123.123 to be forwarded to port 22 on the virtual machine with an IP address of 192.0.10.20:
- name: example nat rule vca_nat: instance_id: "abcdef123456-1234-abcd-1234-abcdef123456" vdc_name: "my_vcd" service_type: "vca" state: "present" nat_rules: - rule_type: "DNAT" original_ip: "123.123.123.123" original_port: "2222" translated_ip: "192.0.10.20" translated_port: "22"
This means that to access SSH on the virtual machine 192.0.10.20 from our external network, we would need to run something like the following command:
$ ssh username@123.123.123.123 ...