liveBook · Manning

Port number

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A network port is a numbered logical endpoint that identifies a service or application protocol on a networked host.

A port number identifies a network service or application endpoint on a host. Firewalls use ports, together with protocols and source or destination addresses, to allow or deny traffic. For a web server, expose only port 80 for HTTP and port 443 for HTTPS; keep unnecessary external ports closed. section 5.0 section 5.4

Apply least-privilege network access by opening only the ports required for a specific connection:

  • Allow TCP port 22 when an SSH request must reach an EC2 instance from an approved source. section 5.4
  • Allow inbound TCP port 2049 from the client security group when EC2 instances mount an EFS filesystem through NFSv4.1. section 9.2
  • Review outbound rules as well as inbound rules; restricting outgoing SMTP, for example, can prevent a test system from emailing customers. section 5.4
Figure 5.8 How an SSH request travels from source to destination, controlled by a firewall

Trace an SSH request from its source IP address through the AWS firewall to its destination, and see how a port rule controls access. section 5.4

EFS mount target

Protect an EFS mount target with a security group that permits inbound TCP port 2049 only from the client security group. This supports a changing fleet of authorized clients without granting access by individual IP address. section 9.2

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains port-based firewall rules through web, SSH, and EFS examples, but does not develop port internals or application security.
Examples
Uses ports 80, 443, 22, and 2049 in web-server, SSH, and EFS mount-target scenarios.
What it assumes
Assumes basic AWS and networking terms while clarifying IP addresses, inbound traffic, outbound traffic, and firewall decisions.
What you can do after
Operate/configure security-group rules that expose required services while restricting unnecessary inbound and outbound traffic.
How it connects
Connects port numbers with security groups, firewalls, IP addresses, HTTP, HTTPS, SSH, NFS, EFS, and VPC Reachability Analyzer.

Also explained in

Compare how 7 books explain port number →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.