Blame tests/p_iptables/iptables_default_rules.sh

Athmane Madjoudj 2f194a
#!/bin/bash
Athmane Madjoudj 2f194a
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj 2f194a
Athmane Madjoudj 2f194a
t_Log "Running $0 - check iptables default rules"
Athmane Madjoudj 2f194a
Karanbir Singh 23b6ba
if [ $SKIP_QA_HARNESS -eq 1 ]; then
Athmane Madjoudj b45181
  echo "Skip, No standard firewall config ..."
Athmane Madjoudj b45181
else
Athmane Madjoudj b45181
Athmane Madjoudj 6e3daf
(grep "state --state ESTABLISHED,RELATED -j ACCEPT" /etc/sysconfig/iptables > /dev/null 2>&1 ) && \
Athmane Madjoudj 2f194a
Athmane Madjoudj 6e3daf
(grep "state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT" /etc/sysconfig/iptables > /dev/null 2>&1 ) && \
Athmane Madjoudj 2f194a
Athmane Madjoudj 6e3daf
(grep "REJECT --reject-with icmp-host-prohibited" /etc/sysconfig/iptables > /dev/null 2>&1 )
Athmane Madjoudj 2f194a
Athmane Madjoudj b45181
fi
Athmane Madjoudj b45181
Athmane Madjoudj 2f194a
t_CheckExitStatus $?
Athmane Madjoudj 2f194a