GithubHelp home page GithubHelp logo

firewall's Introduction

firewall

Design:

To determine whether or not a packet will be accepted by the firewall or not, my instinctual response was to iterate through all the rules, and for every rule, compare each individual element (direction, protocol, port, ip address). However, with a large set of rules, this would not be efficient. If I had additional time, I would have tested different designs in searching through all the rules. When initializing the class, I would read the csv file and separate the data into filterable sections (eg. all the rules that have direction = "inbound"), to avoid iterating through all the rules every time a new packet is encountered.

Test:

Given the hour allotted for this challenge, I was not able to fully test my code, but if I had additional time, I would have created a csv file with a collection of valid inputs ranging from a simple IP address to inputs including ranges. I would then initialize the firewall and test it with entries of different direction, protocol, and ranges within and outside of the initialize port and IP address, to make sure I covered all possible inputs and scenarios.

firewall's People

Contributors

j-tang3 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.