0
0
Cybersecurityknowledge~30 mins

Cloud network security groups in Cybersecurity - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding Cloud Network Security Groups
📖 Scenario: You are managing a cloud environment where you need to control access to virtual machines. Cloud network security groups help you allow or block traffic based on rules.
🎯 Goal: Build a simple list of security group rules, add a configuration for allowed ports, apply filtering logic to select allowed rules, and finalize the security group setup.
📋 What You'll Learn
Create a list called security_rules with specific inbound rules
Add a variable allowed_ports listing ports to allow
Filter security_rules to keep only rules with ports in allowed_ports
Add a final confirmation variable security_group_ready set to True
💡 Why This Matters
🌍 Real World
Cloud network security groups are used by system administrators to protect virtual machines by allowing or blocking network traffic based on rules.
💼 Career
Understanding how to configure and manage security groups is essential for cloud engineers, security analysts, and network administrators to maintain secure cloud environments.
Progress0 / 4 steps
1
Create initial security rules list
Create a list called security_rules with these dictionaries exactly: {'protocol': 'tcp', 'port': 22, 'action': 'allow'}, {'protocol': 'tcp', 'port': 80, 'action': 'allow'}, {'protocol': 'tcp', 'port': 443, 'action': 'allow'}, and {'protocol': 'udp', 'port': 53, 'action': 'allow'}.
Cybersecurity
Need a hint?

Use a list with dictionaries inside. Each dictionary has keys: 'protocol', 'port', and 'action'.

2
Add allowed ports configuration
Create a list called allowed_ports containing the integers 22, 80, and 443.
Cybersecurity
Need a hint?

Use a list with the exact port numbers as integers.

3
Filter rules by allowed ports
Create a new list called filtered_rules that includes only the dictionaries from security_rules where the port value is in the allowed_ports list.
Cybersecurity
Need a hint?

Use a list comprehension to filter rules by checking if rule['port'] is in allowed_ports.

4
Finalize security group setup
Create a variable called security_group_ready and set it to True to indicate the security group is configured.
Cybersecurity
Need a hint?

Just assign True to the variable security_group_ready.