Firewall Implementation

Group 4 - Ankit Kumar (Y8088), Akshay Mittal (Y8056), Ashish Gupta (Y8140) & Sayandeep Ghosh (Y8465)

To compile a code :
$ gcc -o <output name> code.c
eg: $ gcc -o router router.c

The firewall can be run at the router by running command ./router. 
The router address and port needs to be mentioned at firewall.h.

We build four clients to test the firewall.

client1TCP and client2TCP : 	The code pass message from client1TCP to client2TCP through firewall 
				program at the router. Here, it would be checked against the various rules mentioned in firewallTree.c

				client1TCP and client2TCP machine IP addresses and Port numbers need to be mentioned first in address.h.

				at computer 1 --> ./client1TCP <message to send>
				at computer 2 --> ./client2TCP

According to the action specified in the rule, the firewall 
1. accepts and proceeds to check content based filtering
2. rejects and informs client1 that packet has been dropped
3. just drops the packet without notifying clien1

After passing the rules criterion mentioned in the firewall, the content of the message are checked against 
list of words mentioned in filterWords.c. If no such word is parsed in the message, the firewall forwards the 
message to client2 extracting client2 address from packet header and returns an acknowledgement to client1.

Similarly, the other codes client1UDP and client2UDP are same, the only difference being they are testing the
firewall by sending UDP packets.

  
