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
Athmane Madjoudj 2f194a
(grep "-m state --state ESTABLISHED,RELATED -j ACCEPT" /etc/sysconfig/iptables > /dev/null 2>&1 ) && \
Athmane Madjoudj 2f194a
Athmane Madjoudj 2f194a
(grep "-m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT" /etc/sysconfig/iptables > /dev/null 2>&1 ) && \
Athmane Madjoudj 2f194a
Athmane Madjoudj 2f194a
(grep "-j REJECT --reject-with icmp-host-prohibited"
Athmane Madjoudj 2f194a
 /etc/sysconfig/iptables > /dev/null 2>&1 )
Athmane Madjoudj 2f194a
Athmane Madjoudj 2f194a
t_CheckExitStatus $?
Athmane Madjoudj 2f194a