Latest / CyberCode Academy / Course 18 - Evading IDS Firewalls and Honeypots | Episode 2: Configuring a Cisco PIX Firewall to Establish a Secure Enclave
Transcript
- 0:00Speaker 1: When it comes to digital security. You know, the vast
- 0:03Speaker 1: majority of people, they just rely on host based firewalls,
- 0:05Speaker 1: the ones built right into their operating system like Windows
- 0:08Speaker 1: or Linux.
- 0:09Speaker 2: And that's fine for protecting you know, a single device,
- 0:13Speaker 2: but it leaves your whole network perimeter wide open.
- 0:15Speaker 1: So what you're saying is, if you only have those
- 0:17Speaker 1: host firewalls, every single device is basically responsible for its
- 0:21Speaker 1: own security.
- 0:22Speaker 2: Exactly, if one machine falls, your entire internal environment is exposed.
- 0:27Speaker 2: What we're diving into today is moving beyond that by
- 0:30Speaker 2: implementing real architectural control, setting up a dedicated standalone firewall
- 0:36Speaker 2: device to actually segment your network.
- 0:39Speaker 1: So our mission in this deep dive is to take
- 0:41Speaker 1: a physical device, turn it into a high security gateway
- 0:45Speaker 1: and create a truly protected zone, a secure enclave.
- 0:48Speaker 2: Right, and we're going to walk through the foundational configuration
- 0:51Speaker 2: principles you need to make that hard boundary a reality, and.
- 0:54Speaker 1: For this we're using the Cisco Pix Firewall as our
- 0:58Speaker 1: learning platform.
- 0:59Speaker 2: We are, and what's fascinating here is that while this
- 1:01Speaker 2: might be an older device, it's a perfect low cost
- 1:04Speaker 2: training ground for what exactly.
- 1:06Speaker 1: For mastering the command line operating system. The COLI. That
- 1:10Speaker 1: is fundamentally common to all modern enterprise security devices. The
- 1:15Speaker 1: concepts we master here are universal.
- 1:18Speaker 2: Okay, So let's unpack this physically. Before we type a
- 1:21Speaker 2: single command, we need to understand the connection points on
- 1:24Speaker 2: the box itself absolutely.
- 1:26Speaker 1: There are three key features to know, right.
- 1:28Speaker 2: We have the serial console port, which is our immediate lifeline,
- 1:32Speaker 2: then the single wan port which we'll call the outside,
- 1:36Speaker 2: and an integrated internal switch which will be our inside network.
- 1:40Speaker 1: And that serial port is the physical starting point for
- 1:43Speaker 1: defining the boundary. It ensures that no matter what crazy
- 1:46Speaker 1: things we do to the network interfaces, we can always
- 1:49Speaker 1: log in and fix it directly.
- 1:51Speaker 2: So we start with that physical connection. We need a
- 1:52Speaker 2: USB to serial adapter maybe it shows up on your
- 1:55Speaker 2: system as a COMMMM three to connect our administrative machine
- 1:59Speaker 2: right to the fire console port.
- 2:01Speaker 1: Yep. And that direct console connection is just non negotiable
- 2:03Speaker 1: for the initial setup.
- 2:05Speaker 2: Why is that Because the network interfaces, you know, they
- 2:07Speaker 2: need an IP address and security parameters before they can
- 2:10Speaker 2: talk on the network. Until those are defined, the only
- 2:13Speaker 2: way in is locally through that console cable, So you're.
- 2:15Speaker 1: Talking the operating system directly bypassing the network entirely exactly. Okay.
- 2:20Speaker 1: So while we're doing that, we also connect the firewalls
- 2:23Speaker 1: manport that's Ethernet zero to our local network, switch our
- 2:27Speaker 1: path to the Internet. Then we fire up our terminal
- 2:30Speaker 1: emulator like putty, configure it for a serial connection to
- 2:34Speaker 1: comm three, and suddenly we see the pax prompt. We're
- 2:39Speaker 1: in and this.
- 2:40Speaker 2: Brings us right to the core of CLI navigation. At
- 2:43Speaker 2: this initial basic prompt, you can use simple tools like
- 2:46Speaker 2: help or just the question mark to see what commands
- 2:49Speaker 2: are available.
- 2:49Speaker 1: This is just a basic user mode. It won't let
- 2:51Speaker 1: us make any system changes.
- 2:52Speaker 2: Right correct, It's mostly for viewing status. So we need
- 2:55Speaker 2: to change our context. We need to enter what's called
- 2:57Speaker 2: privilege mode.
- 2:58Speaker 1: Which is like gaining root access. You do that just
- 3:00Speaker 1: by typing anything see.
- 3:02Speaker 2: And this is where a crucial security principle comes in.
- 3:05Speaker 2: On a lot of these learning devices, the dafful password
- 3:08Speaker 2: is blank, but the very first non negotiable step after
- 3:12Speaker 2: you log in should be to change it immediately. Immediately
- 3:16Speaker 2: you use the enabled password command. Security starts with authentication
- 3:20Speaker 2: even on a practice device.
- 3:22Speaker 1: Right, So once we run that enable command, the prompt changes,
- 3:26Speaker 1: confirming we're in trivilege mode. Now The full suite of
- 3:29Speaker 1: system altering commands is open to us, So before.
- 3:33Speaker 2: We break anything, we need to know what we're starting with.
- 3:35Speaker 2: We need a baseline. How do we get that We
- 3:37Speaker 2: use the powerful administrative command show configure. This just dumps
- 3:41Speaker 2: the entire running configuration right to the screen.
- 3:44Speaker 1: And by looking at that output, we can understand how
- 3:46Speaker 1: the device is currently set up precisely.
- 3:48Speaker 2: And what you'll notice immediately are the interface definitions. Ethernet
- 3:52Speaker 2: zero is labeled outside that's the public unsecured side.
- 3:56Speaker 1: And Ethernet one, the integrated switch, is labeled inside. This
- 4:00Speaker 1: naming is really important, isn't it.
- 4:02Speaker 2: It's critical because it assigns a security level to the interface.
- 4:06Speaker 2: It immediately tells the firewall which interface is trusted in
- 4:09Speaker 2: which one isn't okay.
- 4:11Speaker 1: And if we look at the IP status, we see
- 4:14Speaker 1: there's an ol IP address on the outside. But the
- 4:17Speaker 1: important part is that the inside interface has no IP
- 4:20Speaker 1: address yet, right.
- 4:21Speaker 2: It confirms it's not operational. It's a clean slate for
- 4:24Speaker 2: our secure zone.
- 4:26Speaker 1: So we've surveyed the landscape. Now we need to flip
- 4:29Speaker 1: the switch from viewing to editing.
- 4:31Speaker 2: We enter configuration mode by typing configure terminal or the
- 4:35Speaker 2: common shortcut config t the prompt changes again, and now
- 4:38Speaker 2: we can make live changes.
- 4:40Speaker 1: Now, before we start with the interfaces, let's quickly touch
- 4:42Speaker 1: on user management.
- 4:43Speaker 2: Since we're here, good call, it's always best practice to
- 4:46Speaker 2: create standard user roles. If you run show username, you
- 4:49Speaker 2: can see who currently has.
- 4:50Speaker 1: Access and if we need to add, say a colleague,
- 4:53Speaker 1: we can set up a new local account. But crucially
- 4:56Speaker 1: we assign it a lower privileged level like level two.
- 5:00Speaker 2: Principle of least privilege in action, you save the highest
- 5:02Speaker 2: privileged level for essential configuration changes only.
- 5:06Speaker 1: And speaking of saving, after making any change, you can't
- 5:09Speaker 1: forget the essential step right memory or the shortcut worm.
- 5:15Speaker 2: Yes, if you skip that, all your work is gone.
- 5:17Speaker 2: If the device reboots or loses.
- 5:19Speaker 1: Power, which is often necessary right to apply major changes,
- 5:23Speaker 1: you run the reload command.
- 5:25Speaker 2: So this brings us to the core architectural task defining
- 5:28Speaker 2: our secure enclave.
- 5:30Speaker 1: Let's lay out the topology our existing local network. The
- 5:33Speaker 1: one connected to the Internet is say one ninety two
- 5:36Speaker 1: point one sixty eight point one point zero two.
- 5:39Speaker 2: Four, right, a pretty standard home or small office network.
- 5:42Speaker 2: This is what the pix is outside interface will connect to.
- 5:45Speaker 1: And the secure zone, the completely protected environment behind the firewall.
- 5:49Speaker 1: We use a totally different private IP range. We've chosen
- 5:52Speaker 1: ten point in the er en point.
- 5:53Speaker 2: And two four and that segregation is security. The ten
- 5:56Speaker 2: point erro N network is completely sealed off. Any traffic
- 5:59Speaker 2: for this range needs explicit permission and modification before it
- 6:02Speaker 2: can ever leave.
- 6:03Speaker 1: The firewall is the only thing that lives in both worlds.
- 6:05Speaker 2: That's it.
- 6:06Speaker 1: Okay, Time to set up the outside interface Ethernet zero.
- 6:09Speaker 1: It needs to connect to our one ninety two network.
- 6:11Speaker 1: But wait, it has that old existing IP address on it.
- 6:14Speaker 1: What happens if we just try to assign a new
- 6:16Speaker 1: one great.
- 6:17Speaker 2: Question that highlights a universal skill in COLI devices. If
- 6:22Speaker 2: you try to assign a conflicting IP, the command will
- 6:25Speaker 2: often fail or worse cause really unexpected network behavior.
- 6:29Speaker 1: So how do we fix it?
- 6:30Speaker 2: This is where the simple but essential no command comes in.
- 6:33Speaker 2: You explicitly use the no version of the command to
- 6:37Speaker 2: remove that old IP address. You wipe the slate clean
- 6:40Speaker 2: for that interface.
- 6:40Speaker 1: It's like an undo button for a specific configuration line exactly.
- 6:43Speaker 2: Once that's clear, we can assign the new static IP address.
- 6:47Speaker 2: In this scenario one nine to two point one six
- 6:49Speaker 2: eight point one point two five to four to the
- 6:51Speaker 2: pix's outside interface.
- 6:52Speaker 1: Okay, so the firewall now looks like just another device
- 6:55Speaker 1: on our existing local network.
- 6:56Speaker 2: Next we can figure the inside interface. This is the
- 6:59Speaker 2: gateway for our news secure enclave. We'll assign it the
- 7:01Speaker 2: adjuss ten point zero point zero point one, and we
- 7:04Speaker 2: make sure both interfaces are active and operational.
- 7:07Speaker 1: Right, so, workstation inside the enclave, say it ten point
- 7:10Speaker 1: zero point two knows it's gateways ten point zero point one,
- 7:14Speaker 1: which is the PIX. But the PIX itself it needs
- 7:19Speaker 1: to know where the Internet is exactly.
- 7:21Speaker 2: Just defining the local IPS isn't enough. We have to
- 7:24Speaker 2: configure the necessary route. This route tells the firewall that
- 7:27Speaker 2: if traffic is destined for anywhere outside the one ninety two.
- 7:31Speaker 1: Network, meaning the wider Internet.
- 7:32Speaker 2: It needs to send that traffic through the local network's
- 7:35Speaker 2: Internet gateway. This makes sure that two way communication can happen.
- 7:39Speaker 1: We say that change with WRM. Now let's check connectivity.
- 7:42Speaker 1: Right from the PIX console. We can ping the enclave gateway,
- 7:46Speaker 1: our local router and the Internet.
- 7:47Speaker 2: It all works, and a local network workstation can ping
- 7:51Speaker 2: the pix's outside interface. Everything looks connected.
- 7:54Speaker 1: But here's where it gets really interesting. This is where
- 7:56Speaker 1: the security part really shines.
- 7:57Speaker 2: This is it.
- 7:58Speaker 1: What doesn't work yet is that in internal enclave workstation
- 8:01Speaker 1: ten point zero point two, trying to ping out to
- 8:03Speaker 1: the world is completely blocked. It is, and that's not
- 8:06Speaker 1: a bug. That is the core feature of a dedicated firewall.
- 8:09Speaker 1: It operates on a principle called deny by default.
- 8:12Speaker 2: Exactly, if you haven't explicitly told it to allow traffic,
- 8:15Speaker 2: it drops it. We've defined the walls, but we haven't
- 8:17Speaker 2: built the door yet.
- 8:19Speaker 1: So how do we build that door.
- 8:20Speaker 2: We need to implement two critical security concepts, one after
- 8:23Speaker 2: the other. The first is about policy access lists or acls.
- 8:28Speaker 1: Okay, what do they do?
- 8:29Speaker 2: And ACL defines what kind of traffic is allowed to
- 8:32Speaker 2: pass through an interface and in which direction. So we
- 8:36Speaker 2: set up an access list to explicitly allow the specific
- 8:39Speaker 2: protocols we want.
- 8:40Speaker 1: For our initial tests, that would be ICMP, the protocol
- 8:43Speaker 1: used for the ping command.
- 8:45Speaker 2: Right. The ACL is essentially the security guard defining the
- 8:48Speaker 2: rules of engagement. That's the what. But now we face
- 8:51Speaker 2: the where.
- 8:52Speaker 1: What do you mean?
- 8:52Speaker 2: Our internal network uses private addresses the ten point zero
- 8:56Speaker 2: oh nan range, which are not recognizable on the public
- 8:58Speaker 2: Internet traffic. Try to leave with a ten point zero
- 9:02Speaker 2: point two source address, the Internet would just reject it instantly.
- 9:06Speaker 1: H okay, So we need a second component we do.
- 9:09Speaker 2: We need network address translation or net net.
- 9:12Speaker 1: That's the magic key that solves this. So the PIX
- 9:15Speaker 1: acts like a postal service. It translates all those individual
- 9:18Speaker 1: private addresses into its single public routable IP address.
- 9:22Speaker 2: That's a perfect analogy to the rest of the Internet.
- 9:25Speaker 2: Every device inside your enclave appears to be the same
- 9:28Speaker 2: single machine. We assign a unique net ID to link
- 9:31Speaker 2: the inside and outside translation process.
- 9:34Speaker 1: So once those two rules are configured, the ACL defining
- 9:36Speaker 1: the allowed protocol ICMP and the NEAT defining the allowed
- 9:40Speaker 1: identity the translation, we can rerun the test and.
- 9:44Speaker 2: The result is immediate. The secure enclave workstation ten pot
- 9:48Speaker 2: zero point zero point two now has full ping access
- 9:51Speaker 2: to the outside world. We have functional secure connectivity, and.
- 9:55Speaker 1: That framework allows for so much more than just pinging.
- 9:57Speaker 1: Right with a few tweaks to the ACL, that internal
- 10:00Speaker 1: workstation can now browse the web, get email, anything.
- 10:04Speaker 2: But every single packet is now inspected by the PIX.
- 10:07Speaker 1: So what does this configuration truly bias. We put in
- 10:10Speaker 1: minimal rules to allow full connectivity. Let's validate the security
- 10:13Speaker 1: boundary we were just created by running an end map scan,
- 10:15Speaker 1: a network mapping tool, on the PIX device from the outside.
- 10:18Speaker 2: The output of that scan is the confirmation of your
- 10:21Speaker 2: architectural success. You'll see that virtually none of the PIX
- 10:25Speaker 2: device is exposed.
- 10:26Speaker 1: Well will it show?
- 10:27Speaker 2: The scan will confirm that ICMP is running because we
- 10:30Speaker 2: explicitly allowed it, and the MS address identifies it as
- 10:33Speaker 2: a Cisco device. But there are no open ports, no
- 10:36Speaker 2: unexpected services. It's proof of minimal exposure.
- 10:40Speaker 1: And this is where the concept scales up really fast.
- 10:42Speaker 1: We focused on basic outside access, but this framework allows
- 10:46Speaker 1: for extremely granular, sophisticated policies absolutely.
- 10:50Speaker 2: Because we're using access lists, we don't have to just
- 10:53Speaker 2: say allow everything. We can define policies to filter specific
- 10:56Speaker 2: IP addresses, subnets, even individual protocols based on numbers.
- 11:00Speaker 1: So for example, you can allow SMTP for email but
- 11:03Speaker 1: explicitly block HTTP for web browsing exactly.
- 11:06Speaker 2: And that level of granular control across an entire network
- 11:10Speaker 2: is fundamentally impossible to achieve using only host based firewalls.
- 11:14Speaker 1: We've really covered the full blueprint here for building a
- 11:16Speaker 1: secure network enclave. We went from the initial physical console connection,
- 11:21Speaker 1: through defining the inside and outside interfaces, setting the reading,
- 11:24Speaker 1: and finally layering on and acls.
- 11:27Speaker 2: You know, if we connect this to the bigger picture,
- 11:29Speaker 2: what's so fascinating is realizing that a few precise command
- 11:32Speaker 2: line steps can transform a physical box into an intelligent barrier.
- 11:38Speaker 2: It shows that effective security is always an architectural decision.
- 11:42Speaker 1: It's about knowing exactly what is allowed to pass and what,
- 11:46Speaker 1: by default, must be blocked. So you now have a
- 11:49Speaker 1: tangible sense of the power and flexibility at dedicated firewall offers.
- 11:53Speaker 1: It's about being in control of that hard boundary.
- 11:55Speaker 2: And to really cement that knowledge, let's leave you with
- 11:58Speaker 2: a quick review exercise. We used net and an access
- 12:01Speaker 2: list to provide full outside access. Now, if you, the
- 12:04Speaker 2: network administrator, decided you wanted to stop the internal enclave
- 12:07Speaker 2: users from browsing the web, but still allow them to
- 12:10Speaker 2: send and receive emails, which specific security configuration component would
- 12:14Speaker 2: you need to modify and which application layer protocols would
- 12:17Speaker 2: you focus on blocking.
- 12:18Speaker 1: Something to think about as you continue to explore the
- 12:21Speaker 1: world of network security architecture.