After a topology is deployed into Packet Tracer, you can continue modifying live routers without redeploying the entire topology. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Mats2208/MCP-Packet-Tracer/llms.txt
Use this file to discover all available pages before exploring further.
pt_apply_acl and pt_apply_nat tools send configureIosDevice commands through the HTTP bridge at port 54321, applying access control lists and NAT translations to routers that are already running in the canvas. These tools work independently of pt_live_deploy — they can target any existing device by name.
Access Control Lists (ACL)
ACL Types
MCP Packet Tracer supports all three IOS ACL variants. Choose the type based on how granular your filtering needs to be.| Type | Number Range | Filters On | When to Use |
|---|---|---|---|
standard | 1–99 | Source IP only | Simple traffic blocking by origin subnet or host |
extended | 100–199 | Source + Destination + Protocol + Ports | Fine-grained rules: block HTTP to a server, permit ICMP only |
named | Any string | Source + Destination + Protocol + Ports | Human-readable identifiers; easier to edit in IOS |
Applying an ACL
Thept_apply_acl tool accepts an ACLPlan describing the router, ACL identifier, type, and a list of entries, plus an optional binding that attaches the ACL to a specific interface and direction.
Example — extended ACL blocking HTTP from LAN to a server:
Validation Rules
Before sending any commands,pt_apply_acl validates:
- Number ranges — standard ACLs must be 1–99, extended must be 100–199
- Wildcard masks — must be valid bitwise inverses of subnet masks
- Protocol/port coherence — port operators (
eq,lt,gt,range) are only valid fortcpandudp; ICMP types only apply toicmp - Unreachable rules — entries after an
permit ip any anyordeny ip any anythat will never match are flagged
Object API Variants
In addition to the CLI-based tools above, MCP Packet Tracer provides two Object API variants that drive Packet Tracer’sAclProcess JavaScript API directly instead of sending IOS access-list commands through configureIosDevice. These are useful when working with the live bridge in environments where CLI passthrough is unavailable or unreliable.
pt_apply_acl_object— applies an ACL using the Object API (AclProcessJS API)pt_remove_acl_object— removes an ACL using the Object API
Removing an ACL
pt_remove_acl removes the ACL definition and, optionally, its interface binding.
NAT and PAT
NAT Modes
Three NAT modes map directly to the three IOS NAT variants taught in CCNA.| Mode | Key | When to Use |
|---|---|---|
| Static NAT | static | Servers that need a fixed public IP (web, FTP, mail) |
| Dynamic NAT | dynamic | Pool of public IPs assigned on demand; rare in modern networks |
| PAT (overload) | pat | Many private IPs share one public IP via port numbers |
Applying PAT (Most Common)
PAT withuse_interface_overload=True is the typical home and enterprise scenario — the outside interface’s IP is used directly, so no pool is needed. pt_apply_nat takes flat individual parameters:
Applying Static NAT
Static NAT maps individual private IPs to fixed public IPs with a 1:1 relationship.Applying Dynamic NAT (Pool)
Dynamic NAT assigns public IPs from a pool on demand. Pass pool parameters as individual fields:Removing NAT
pt_remove_nat removes all NAT rules, the pool, the ACL, and the inside/outside interface markings.