Skip to content

Instantly share code, notes, and snippets.

@dysosmus
Created April 24, 2014 07:47
Show Gist options
  • Save dysosmus/11245463 to your computer and use it in GitHub Desktop.
Save dysosmus/11245463 to your computer and use it in GitHub Desktop.
Quick iptables dump
#! /bin/bash
target_dir='/etc/fw'
if [ ! -d "$target_dir" ]; then
mkdir -p $target_dir
fi
iptables-save -c > $target_dir/ipV4-dmp-$(date "+%Y-%m-%d--%H-%M-%S")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment