AWS Security Group & NACL ကိုတွဲသုံးတဲ့အခါ Traffic Flow, Stateful vs Stateless, Best Practice
AWS Cloud Networking မှာ Security Group (SG) နဲ့ Network Access Control List (NACL) ကိုအတူသုံးတဲ့အချိန် Traffic Flow, Stateful/Stateless လုပ်ဆောင်ချက်၊ Best Practice စတာတွေကိုနားလည်ထားရင် Security အတွက်လဲ အဆင်ပြေသလို Troubleshooting လဲ လွယ်ကူစေပါတယ်။
1. SG & NACL Traffic Flow
Client တစ်ယောက်က EC2 Instance ဆီ Traffic ပို့တဲ့အချိန်မှာ AWS အတွင်း Flow က အောက်ကအတိုင်း ဖြစ်ပါတယ်။
Inbound Flow:
Client → NACL → Security Group → EC2
Outbound Flow:
EC2 → Security Group → NACL → Internet
ဆိုတော့ NACL က Subnet Layer မှာ first gatekeeper အဖြစ်လုပ်ဆောင်ပြီး, SG က Instance Layer မှာ last gatekeeper အဖြစ် Instance ထဲကို ဝင်လာမယ့်/ထွက်သွားမယ့် traffic ကို filter လုပ်ပေးတာပါ။
2. Stateful vs Stateless Impact
SG က Stateful ဖြစ်တဲ့အတွက် Inbound rule တစ်ခု Allow လုပ်ထားရင် Return traffic ကို AWS က auto allow လုပ်ပေးတာကြောင့် Outbound reply route အတွက် rule အသစ်ထည့်ပေးဖို့မလိုပါဘူး။
NACL က Stateless ဖြစ်တဲ့အတွက် Inbound traffic ကို Allow လုပ်ထားပေမယ့် Return traffic အတွက် Outbound rule ကိုလည်း explicit လုပ်ပေးရပါမယ်။ ဥပမာ - NACL Inbound → Port 22 Allow, NACL Outbound → Ephemeral Ports (1024–65535) မရေးထားရင် SSH connection က timeout ဖြစ်သွားမှာပါ။
ဒီ အချက်က Connection success အတွက် အရေးကြီးတဲ့အချက်ဖြစ်ပြီး, NACL ကို configure လုပ်တဲ့အချိန် သတိထားရမဲ့ အချက်တစ်ခုဖြစ်ပါတယ်။
3. Best Practice
Production-level VPC setup မှာ NACL ကို Broad-Level Blacklist, SG ကို Service-Level Whitelist အနေနဲ့ configure လုပ်ရင် အဆင်ပြေပါတယ်။
NACL: Malicious IP ranges, Suspicious subnets စတာတွေကို Wide-level filtering လုပ်ပြီး Root-level Block/Allow လုပ်မယ်။
SG: Required ports, Trusted source IPs, Instance/Service-specific granular control တွေကို only allow လုပ်ပြီး Service-level access control ကို handle လုပ်မယ်။ ဒီ practice က Security ကိုကောင်းမွန်စေသလို၊ Maintainability အတွက်လည်း အထူးသင့်တော်ပြီး Troubleshooting လုပ်ရာမှာလည်း လွယ်ကူစေပါတယ်
Discussion
Join the conversation
How do you feel about this article?
Comments
Sign in to join the conversation
Sign in to be the first to comment!
Share Your Article
Share with your professional network
Recent Articles
Day 1 - Software Development ကို ပိုပြီးမြန်စေမယ့် CI/CD
Software တစ်ခုရေးပြီးပြီဆိုရင် "ငါ့စက်ထဲမှာတော့ အလုပ်လုပ်တယ်" ဆိုရုံနဲ့ မပြီးသေးပါဘူး။ User တွေသုံးမယ့် Server ပေါ်ရောက်...

Secure AWS ECR Github Action Using OIDC
Modern DevOps နှင့် Cloud Security တို့မှာ အဓိကဖြစ်လာသည့် Authentication System ယနေ့ခေတ် DevOps, Cloud Engineering, CI/C...

Manual vs Automated Infrastructure: Why "useradd" Still Matters in the Terraform Era
DevOps careerကို လျှောက်နေတဲ့သူတိုင်း Terraform၊ Ansible စတဲ့ Infrastructure as Code (IaC) tools တွေရဲ့ အလုပ်လုပ်နိုင်စွ...
From Surviving to Thriving
“AI ကြောင့် developer အလုပ်ပျောက်သွားမလား?” ဆိုတဲ့ မေးခွန်းကို Junior developer တိုင်း စဉ်းစားဖူးကြမှာပါ။ ဈေးကွက်အခြေအနေ...

AWS - Global Infra
AWS Global Infra AWS Global Infra & Service Type ဆိုတဲ့ ခေါင်းစဉ်နဲ့ ၂၀၂၅ ဒီဇင်ဘာမှာရေးထားဖူးတဲ့ article ကို အရင်ဆုံး ဖတ...

