We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Open Web Traffic

The PatientPing app is running on the server, but nobody can reach it because our patientping-public security group only allows inbound SSH traffic on port 22. Port 8080, where the app is listening, is blocked.

This is actually a good default. A firewall that blocks everything except what you explicitly allow is the safest starting point. You saw firsthand in the last lesson what that looks like: the browser just hangs because the packets never make it through.

Now let's poke a hole for web traffic.

Assignment

Add an inbound rule to the patientping-public security group to allow web traffic on port 8080.

Cost check: No new resources. Security group rules are free.

Security group changes take effect almost immediately. You don't need to restart the instance or the application.

If the site loads (don't worry about pesky "Not Secure" warnings from your browser), you're good to go.

Run and submit the CLI tests.

Tip

If you want to use the CLI instead:

# Get the security group ID
aws ec2 describe-security-groups --filters 'Name=group-name,Values=patientping-public' --query 'SecurityGroups[0].GroupId' --output text

# Add the inbound rule
aws ec2 authorize-security-group-ingress --group-id SG-ID --ip-permissions IpProtocol=tcp,FromPort=8080,ToPort=8080,IpRanges=[{CidrIp=0.0.0.0/0,Description="Allow web traffic for PatientPing site"}]