def getOSFirewallRules(update):
    """
    There is a set of default things that must exist just for the chute to function at all, generate those here.

    Stored in key: osFirewallRules
    """
    interfaces = update.cache_get('networkInterfaces')
    if interfaces is None:
        return None
    rules = []
    for iface in interfaces:
        config = {'type': 'zone'}
        options = {'name': iface['externalIntf'], 'conntrack': True,
            'input': 'REJECT', 'forward': 'ACCEPT', 'output': 'ACCEPT',
            'network': [iface['externalIntf']]}
        if iface['type'] == 'wan':
            options['masq'] = 1
        else:
            options['masq'] = 0
        rules.append((config, options))
        if iface['type'] == 'wan':
            config = {'type': 'forwarding'}
            options = {'src': iface['externalIntf'], 'dest': 'wan'}
            rules.append((config, options))
        if 'dhcp' in iface:
            config = {'type': 'rule'}
            options = {'src': iface['externalIntf'], 'proto': 'udp',
                'dest_port': 53, 'target': 'ACCEPT'}
            rules.append((config, options))
            config = {'type': 'rule'}
            options = {'src': iface['externalIntf'], 'proto': 'udp',
                'dest_port': 67, 'target': 'ACCEPT'}
            rules.append((config, options))
    update.cache_set('osFirewallRules', rules)
