📝 Section Review: Internet & NAT Access
اہم نکاتKey TakeawaysKey Takeaways
- انٹرنیٹ گیٹ وے VPC کو دو طرفہ انٹرنیٹ رسائی دیتا ہے۔Internet Gateway VPC ko do tarfa internet access deta hai.An Internet Gateway gives the VPC two-way internet access.
- NAT گیٹ وے پرائیویٹ سب نیٹس کو آؤٹ باؤنڈ-اونلی انٹرنیٹ رسائی دیتا ہے، پبلک سب نیٹ میں بنتا ہے اور Elastic IP کے ساتھ چلتا ہے۔NAT Gateway private subnets ko outbound-only internet access deta hai, public subnet mein banta hai aur Elastic IP ke saath chalta hai.A NAT Gateway gives private subnets outbound-only internet access and lives in a public subnet with an Elastic IP.
- روٹ ٹیبلز راستہ طے کرتے ہیں: public → IGW، private → NAT گیٹ وے۔Route tables rasta tay kartay hain: public → IGW, private → NAT Gateway.Route tables decide the path: public → IGW, private → NAT Gateway.
- سب نیٹ تب پبلک ہوتا ہے جب اس کا روٹ ٹیبل 0.0.0.0/0 کو انٹرنیٹ گیٹ وے کی طرف point کرے۔Subnet tab public hota hai jab is ka route table 0.0.0.0/0 ko Internet Gateway ki taraf point kare.A subnet is public only when its route table points 0.0.0.0/0 at an Internet Gateway.
خود جانچ (مشق)Self-Check (Practice)Self-Check (Practice)
یہ مشقی سوالات ہیں، امتحانی سوالات نہیں۔These are practice questions, not exam questions.These are practice questions, not exam questions.
❓ انٹرنیٹ گیٹ وے کیا کرتا ہے؟ (پریکٹس سوال)Internet Gateway kya karta hai? (practice sawal)What does an Internet Gateway do? (practice question)
پبلک سب نیٹس کے لیے دو طرفہ انٹرنیٹ رسائی — VPC > Internet Gateways سے بنائیں اور VPC سے attach کریں۔Public subnets ke liye do tarfa internet access — VPC > Internet Gateways se banayein aur VPC se attach karein.Two-way internet access for public subnets — created with VPC > Internet Gateways and attached to the VPC.
❓ NAT گیٹ وے کیا کرتا ہے؟ (پریکٹس سوال)NAT Gateway kya karta hai? (practice sawal)What does a NAT Gateway do? (practice question)
پرائیویٹ وسائل کے لیے آؤٹ باؤنڈ-اونلی رسائی۔ یہ پبلک سب نیٹ میں بنتا ہے اور اسے Elastic IP چاہیے۔Private resources ke liye outbound-only access. Yeh public subnet mein banta hai aur isay Elastic IP chahiye.Outbound-only access for private resources. It lives in a public subnet and needs an Elastic IP.
❓ پبلک اور پرائیویٹ سب نیٹس کو کون سے روٹس چاہئیں؟ (پریکٹس سوال)Public aur private subnets ko kaun se routes chahiye? (practice sawal)What routes do public and private subnets need? (practice question)
پبلک روٹ ٹیبل میں 0.0.0.0/0 → IGW؛ پرائیویٹ روٹ ٹیبل میں 0.0.0.0/0 → NAT گیٹ وے۔ درست سب نیٹس associate کریں۔Public route table mein 0.0.0.0/0 → IGW; private route table mein 0.0.0.0/0 → NAT Gateway. Durust subnets associate karein.The public route table needs 0.0.0.0/0 → IGW; the private route table needs 0.0.0.0/0 → NAT Gateway. Associate the right subnets.
❓ کیا پرائیویٹ انسٹنس کو انٹرنیٹ سے direct reach کر سکتے ہیں؟ (پریکٹس سوال)Kya private instance ko internet se direct reach kar sakte hain? (practice sawal)Can you reach a private instance directly from the internet? (practice question)
نہیں۔ پرائیویٹ سب نیٹ کے انسٹنسز کو انٹرنیٹ سے نہیں پہنچا جا سکتا — اسی لیے پرائیویٹ ہیں۔ وہ NAT گیٹ وے کے ذریعے آؤٹ باؤنڈ انٹرنیٹ تک پہنچتے ہیں۔Nahi. Private subnet ke instances ko internet se nahi pahuncha ja sakta — isi liye private hain. Woh NAT Gateway ke zariye outbound internet tak pahunchte hain.No. Instances in private subnets cannot be reached from the internet — that is the point. They reach the internet outbound through the NAT Gateway.