#!/bin/bash
# 
# ipt_conf_states.sh
#
# script to demonstrate Source Network Address Translation over a commie
# router ZTE ZXDSL 931 VII which hides your public address from you
tstamp_hst=$(date +%y%m%d_%H%M)_$(hostname)
iptables -t filter -L -n -v |& tee ipt-t_flt-L-n-v_${tstamp_hst} 
echo "--------------------------"
read FAKE
iptables -t nat -L -n -v |& tee ipt-t_nat-L-n-v_${tstamp_hst} 
echo "--------------------------"
read FAKE
iptables -t mangle -L -n -v |& tee ipt-t_mgl-L-n-v_${tstamp_hst} 
echo "--------------------------"
read FAKE
iptables -t raw -L -n -v |& tee ipt-t_raw-L-n-v_${tstamp_hst} 
echo "--------------------------"
echo "=========================="
read FAKE
ip link show |& tee ip_link_show_${tstamp_hst}
echo "--------------------------"
read FAKE
ip addr show |& tee ip_addr_show_${tstamp_hst}
echo "--------------------------"
read FAKE
ip rout show |& tee ip_rout_show_${tstamp_hst}
echo "--------------------------"
read FAKE
cat /etc/resolv.conf
cp -iav /etc/resolv.conf resolv_conf_${tstamp_hst}
echo "--------------------------"
read FAKE
mkdir ipt_conf_states_${tstamp_hst}.d/
mv -iv *_${tstamp_hst} ipt_conf_states_${tstamp_hst}.d/
echo "--------------------------"
echo "=========================="
read FAKE
