def create_firewall(interface: str, interface_data: dict, firewall_type:
    str, naughty_count: int):
    """
            Firewall factory. Will create a firewall based on the type of firewall that is passed in.
            Currently, this function only supports linux based operating systems
        """
    if firewall_type == 'linux':
        from deepdos.iptables import IPtable, IPTCError
        try:
            return IPtable(interface, interface_data, naughty_count)
        except IPTCError:
            print('Need to be root in order to access firewall')
            return None
    raise ValueError(
        'linux is the only supported operating system for firewall mode. You entered: {firewall_type}'
        )
