A simple rudimentary firewall written in C leveraging many networking principles and UNIX libraries.
Commands:
add ACCESS-TYPE [IP/PORT] PROTOCOL
: Adds a rule
delete RULE_NO
: Deletes a specific rule
update RULE_NO ACCESS-TYPE [IP/PORT] PROTOCOL
: Updates a specific rule
list
: Lists all rules
exit
: Exists the service
Special commands:
add deny *: Allows no connection to system
add allow *: Allows all connections to system
TODO:
- Prevent connections to a specific port
- Experiment with eBPF (extended Berkely Packet filters)
- Experiment with other libraries like libnetfilter_queue
- Make the command line more robust and add config files