#!/bin/bash
# until reboot or other iptables actions, make iptables accept all packets
sudo iptables-save | tee /var/tmp/iptables.drop.txt | sed "/-/d;/^#/d;s/DROP/ACCEPT/" | tee /var/tmp/iptables.accept.txt | sudo iptables-restore


syntax highlighted by Code2HTML, v. 0.9.1