السلام عليكم ورحمة الله وبركاته,

لا أتكلم هنا عن برنامج Packet tracer ولكن عن أمر موجود في ASA

قمت بعمل بعض الإعدادت على ASA ولكنك لست متأكدا من النتيجة أو لا يوجد طريقة لعمل إختبار لمعرفة مدى صحة الإعدادت, ماذا تفعل في ذلك الوقت؟ يمكنك إستخدام هذا الأمر packet-tracer لعمل محاكاة ل traffic وسيخبرك ASA بالنتيجة. يمكن إيضا إستخدام هذا الأمر في troubleshooting لمعرفة سبب المشكلة بسرعة بدلا من النظر لعدد طويل من الأسطر ومحاولة إستنتاج سبب المشكلة.

طريقة كتابته هي packet-tracer وبعدين input و بعدين نحدد interface إللي قادم منه traffic وبعدين نحدد نوع الترافيك (TCP,UDP,ICMP) وبعدين نحدد source address and source port وممكن يكونsource port أي رقم إنت تختاره , وبعدين نحدد Destination address and port

خلينا نشوف بعض الأمثلة

ASA(config)# packet-tracer input inside tcp 136.1.121.5 5555 5.6.7.8 23

Phase: 1
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
MAC Access list
ما في Access-list تمنع ال traffic على inside interface

Phase: 2
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow

طبعا ASA هو Stateful firewall ولازم يعمل new entry عنده في Table
Result:
input-interface: inside
input-status: up
input-line-status: up
Action: drop
Drop-reason: (no-route) No route to host

سبب المشكلة انه ما في route ل 5.6.7.8


----------------------------------------------------

ASA(config)# packet-tracer input outside tcp 136.1.123.6 5555 136.1.121.5 23

Phase: 1
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
MAC Access list

Phase: 2
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow

Phase: 3
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 136.1.121.0 255.255.255.0 inside

Phase: 4
Type: ACCESS-LIST
Subtype:
Result: DROP
Config:
Implicit Rule
Additional Information:

Result:
input-interface: outside
input-status: up
input-line-status: up
output-interface: inside
output-status: up
output-line-status: up
Action: drop
Drop-reason: (acl-drop) Flow is denied by configured rule

outside access-list تمنع الترافيك القادم للداخل

---------------------------------------

ASA(config)# packet-tracer input inside tcp 136.1.121.6 5555 136.1.123.5 23

Phase: 1
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow

Phase: 2
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 136.1.123.0 255.255.255.0 outside

Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:

Phase: 4
Type: NAT
Subtype:
Result: DROP
Config:
nat (inside) 0 0.0.0.0 0.0.0.0
nat-control
match ip inside any outside any
no translation group, implicit deny
policy_hits = 1

Additional Information:

Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: drop
Drop-reason: (acl-drop) Flow is denied by configured rule

الترافيك يحتاج nat عشان يقدر يخرج ولا يوجد أي إعدادات ل NAT
---------------------------------------------------------------------------------------
هل وضحت لكم أهمية هذا الأمر.

بالتوفيق لكم جميعا