Bảy cấu hình có vẻ hợp lệ nhưng không hoạt động như mong đợi
Một số cấu hình trông hợp lệ trên console nhưng không cho kết quả như mong đợi, vì cơ chế hoạt động thực tế khác với cách hiểu thông thường.
Các cấu hình dưới đây có vẻ hợp lý khi thao tác trên console, nhưng hoạt động thực tế lại khác. Chọn tình huống, thử phương án thường được áp dụng trước, sau đó chuyển sang phương án đúng.
Nhấn Chạy mô phỏng để quan sát từng bước xử lý. Thay đổi lựa chọn và chạy lại để so sánh kết quả.
- Private hosted zone yêu cầu bật cả enableDnsHostnames và enableDnsSupport.
- Traffic IPv4 đi ra: NAT gateway (egress-only IGW chỉ dành cho IPv6).
- Yêu cầu port forwarding hoặc bastion: NAT instance.
- VPC có tenancy dedicated khiến mọi instance chạy ở chế độ dedicated.
- Source trong rule của security group không thể là internet gateway.
- Hai EC2 instance nên giao tiếp qua private IP: truy cập qua public IP bị tính phí data transfer; qua private IP, traffic giữa hai AZ vẫn tính phí theo GB.
pinglà ICMP: security group cần rule ICMP inbound.- Source/destination check chỉ tắt cho instance làm NAT, router hoặc firewall.
Seven configurations that look valid but do not work as expected
Some configurations look valid in the console but do not behave as expected, because the actual mechanism differs from the common assumption.
The configurations below look reasonable in the console, but they behave differently in practice. Choose a scenario, try the option that is commonly applied first, then switch to the correct option.
Nhấn Chạy mô phỏng để quan sát từng bước xử lý. Thay đổi lựa chọn và chạy lại để so sánh kết quả.
- A private hosted zone requires both enableDnsHostnames and enableDnsSupport.
- Outbound IPv4 traffic: NAT gateway (an egress-only IGW is for IPv6 only).
- Port forwarding or a bastion is required: NAT instance.
- A VPC with dedicated tenancy makes every instance run as dedicated.
- The source of a security group rule cannot be an internet gateway.
- Two EC2 instances should communicate over private IPs: access over a public IP incurs data transfer charges; over private IPs, traffic between two AZs is still charged per GB.
pingis ICMP: the security group needs an inbound ICMP rule.- Disable source/destination check only on an instance that does NAT, routing or firewalling.