Tuesday, February 2, 2016

SCRIPT - Antispoofing Per Interface

SCRIPT - Antispoofing Per Interface

[Expert@myfw-01]# more hinantispoofing.sh
#!/bin/bash
touch /home/admin/dk/antispoof.txt
ANTIFILE=/home/admin/dk/antispoof.txt
echo "" > ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth1-01" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth1-01 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth2-02" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth2-02 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth2-03" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth2-03 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth2-04" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth2-04 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth3-01" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth3-01 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth3-02" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth3-02 >> ${ANTIFILE}

echo "" >> ${ANTIFILE}
echo "eth3-04" >> ${ANTIFILE}
/bin/netstat -nr |grep  eth3-04 >> ${ANTIFILE}

[Expert@myfw-01]#