📝 Section Review: Access Policy
اہم نکاتKey TakeawaysKey Takeaways
- رولز لکھنے سے پہلے reusable آبجیکٹس (نیٹ ورکس، ہوسٹس، سروسز) بنائیں۔Rules likhne se pehle reusable objects (networks, hosts, services) banayein.Build reusable objects (networks, hosts, services) before writing rules.
- Stealth rule پہلے: گیٹ وے کی طرف آنے والا تمام ٹریفک drop کریں۔Stealth rule pehle: gateway ki taraf aane wala sab traffic drop karein.Stealth rule first: drop all traffic destined to the gateway itself.
- رولز اوپر سے نیچے میچ ہوتے ہیں؛ پہلا میچ جیتتا ہے — ترتیب ہی پالیسی ہے۔Rules upar se neeche match hote hain; pehla match jeetta hai — order hi policy hai.Rules match top-down; first match wins — order is the policy.
- Inline layers parent rule کے اندر باریک کنٹرول دیتی ہیں اور بڑی پالیسیوں کو منظم رکھتی ہیں۔Inline layers parent rule ke andar fine-grained control deti hain aur bari policies ko organized rakhti hain.Inline layers give fine-grained control inside a parent rule and keep big policies organized.
- ہمیشہ cleanup rule پر ختم کریں: جو واضح طور پر allow نہیں، سب drop + log۔Hamesha cleanup rule par khatam karein: jo explicitly allow nahi, sab drop + log.Always end with a cleanup rule: drop + log everything not explicitly allowed.
خود جانچ (مشق)Self-Check (Practice)Self-Check (Practice)
یہ مشقی سوالات ہیں، امتحانی سوالات نہیں۔These are practice questions, not exam questions.These are practice questions, not exam questions.
❓ Access rules کیسے جانچے جاتے ہیں؟Access rules kaise evaluate hote hain?How are access rules evaluated?
اوپر سے نیچے، پہلا میچ جیتتا ہے — اس لیے ترتیب اہم ہے۔ مخصوص allows پہلے، وسیع denies بعد میں، cleanup rule آخر میں۔Upar se neeche, pehla match jeetta hai — is liye order ahem hai. Specific allows pehle, broad denies baad mein, cleanup rule aakhir mein.Top-down, first match wins — so order matters. Specific allows first, broad denies after, cleanup rule last.
❓ Inline layer کس لیے ہے؟Inline layer kis liye hai?What is an inline layer for?
Parent rule کے action سے طلب ہونے والا sub-rulebase۔ یہ مرکزی پالیسی کو مختصر رکھتا ہے اور ٹیموں کو اپنی layers کی ملکیت دیتا ہے۔Parent rule ke action se call hone wala sub-rulebase. Yeh main policy ko chhota rakhta hai aur teams ko apni layers own karne deta hai.A sub-rulebase called from a parent rule's action. It keeps the main policy short and lets teams own their own layers.
❓ کون سا رول ہمیشہ آخر میں ہونا چاہیے، اور کیوں؟Kaun sa rule hamesha aakhir mein hona chahiye, aur kyun?Which rule must always be last, and why?
cleanup rule۔ اس کے بغیر unmatched ٹریفک کا رویہ غیر یقینی ہے — ہمیشہ drop + log پر ختم کریں۔Cleanup rule. Is ke baghair unmatched traffic ka behavior ghair yaqeeni hai — hamesha drop + log par khatam karein.The cleanup rule. Without it, unmatched traffic behavior is unpredictable — always end with drop + log.