def _remove_dnsmasq_accept_rules(dev):
    table = iptables_manager.ipv4['filter']
    for port in [67, 53]:
        for proto in ['udp', 'tcp']:
            args = {'dev': dev, 'port': port, 'proto': proto}
            table.remove_rule('INPUT',
                           '-i %(dev)s -p %(proto)s -m %(proto)s '
                           '--dport %(port)s -j ACCEPT' % args)
    iptables_manager.apply()


# NOTE(russellb) Curious why this is needed?  Check out this explanation from
# markmc: https://bugzilla.redhat.com/show_bug.cgi?id=910619#c6
Remove DHCP and DNS traffic allowed through to dnsmasq.
dataset/ETHPy150Open openstack/nova/nova/network/linux_net.py/_remove_dnsmasq_accept_rules