CPE601 Computer Network Systems
Semester Programming Assignment
Firewall
Zipped Code
Objective
The goal of this assignment is to build a firewall running on the server side. The server gets the IP addresses to block from a file (blocked.txt). When a client request for a data from the server (request is just a "send data" command). Server respond with a sentence "This is data", ONLY if the client's IP address is not in the blocked.txt file. If the client's IP address is in the blocked.txt file, then server does not send any data to the client.
Operation Instruction with screen shots:
At the begining, there is only one IP address to block.
We start the server, and it shows the number of IP addresses to block.
We start the client.
Client sends a request.
Server respons to the client.
Now, we add another IP address to block.
Now, server shows the number of IP addresses to block as 2.
When we start another client, the server blocks it.
|