The netbounce code
has been encapsulated as a FooSocket object, and the code simplified.
Your assignment:
Please read the code and
fill out the file project-response.txt, which requires you to run the code
on two machines, capture packest using the tcpdump target in the project makefile, and then
dissect one of the captured packets, demonstrating you understand IP and UPD headers.
AWS Security Groups
In order to establish a communication flow between hosts in the Internet, the flow must be permitted.
Various devices restrict such flows, in order to provide efficiency and security. The AWS solution
of the Security Group is an example of a method of restricting traffic.
You need to identify which securit group is applied to your EC instance. By default, a security
group will be created when the EC instance is created. The security group is associated with your
EC instance until you change it. Security groups can be used by more than once EC instance.
More than one security group can be applied to an EC instance.
A security group is a collection of Inbound Rules. Each rule allows traffic to arrive
at the EC instance. For traffic to pass, it must match,
A protocol. For example the TCP, UDP or ICMP protocols.
A source filter. For example an IP range or an AWS security group.
A port range.
The rule created for an EC instance must allow SSH traffic to come in. Therefore the
automatically created Security Group has in inbound rule to allow TCP port 22 from any
internet host.
For the netbounce, if the server is an EC instance binding to port 3333,
you will add the rule for inbound traffic to allow UDP port 3333 from any internet host.
A socket library
For the following projects a socket library is provided. This is a first example of the
library that has this functionality,
It is called to create a socket object. The object is bound to a port number.
The object is called to send a message to a particular destination.
The object is called to listen for incoming packets. The source of the packet is remembered.
The object is called to reply to the a packets received.
While we do not use this concept heavily, a socket is connected when it
is dedicated to a peer in the communication. In a sense, our foo sockets which have listened at
received a packet are connected to the source of that packet, as reply will send to that peer.