firewall: Add INPUT rules if sshd is available

This commit is contained in:
Jeremy Gardais 2015-09-16 17:59:42 +02:00
parent e1b4d59b4f
commit 147538cfa5
1 changed files with 14 additions and 14 deletions

View File

@ -118,10 +118,10 @@ fw_start() {
# Accept icmp ping from LAN
#$IPT -A INPUT -j ACCEPT -p icmp -i "${ILAN}" -s ${LAN} -d "${IPLAN}" -m comment --comment "ICMP req LAN"
if [ $(command -v sshd) ]; then
#### SSHD
#$IPT -A INPUT -j ACCEPT -p tcp -i "${ILAN}" -d "${IPLAN}" --dport 22 -m state --state NEW -m comment --comment "New SSH in"
$IPT -A INPUT -j ACCEPT -p tcp -i "${ILAN}" -d "${IPLAN}" --dport 22 -m state --state NEW -m comment --comment "New SSH in"
fi
## BackupPC
$IPT -A INPUT -j ACCEPT -p icmp -i "${ILAN}" -s 192.168.0.3 -d "${IPLAN}" -m comment --comment "ICMP FURY req"