Beispiel #1
0
def clean():
    LOGGER.info('clean...')
    try:
        iptables.flush_fq_chain()
        try:
            LOGGER.info('iptables -L -v -n')
            LOGGER.info(shell.check_output(shlex.split('iptables -L -v -n')))
        except subprocess.CalledProcessError, e:
            LOGGER.error('failed to dump filter table: %s' % (sys.exc_info()[1]))
            LOGGER.error(e.output)
        try:
            LOGGER.info('iptables -t nat -L -v -n')
            LOGGER.info(shell.check_output(shlex.split('iptables -t nat -L -v -n')))
        except subprocess.CalledProcessError, e:
            LOGGER.error('failed to dump nat table: %s' % (sys.exc_info()[1]))
            LOGGER.error(e.output)
Beispiel #2
0
def clean():
    LOGGER.info('clean...')
    try:
        iptables.flush_fq_chain()
        try:
            LOGGER.info('iptables -L -v -n')
            LOGGER.info(shell.check_output(shlex.split('iptables -L -v -n')))
        except subprocess.CalledProcessError, e:
            LOGGER.error('failed to dump filter table: %s' % (sys.exc_info()[1]))
            LOGGER.error(e.output)
        try:
            LOGGER.info('iptables -t nat -L -v -n')
            LOGGER.info(shell.check_output(shlex.split('iptables -t nat -L -v -n')))
        except subprocess.CalledProcessError, e:
            LOGGER.error('failed to dump nat table: %s' % (sys.exc_info()[1]))
            LOGGER.error(e.output)