From f4256712164bee7091126de4f7250b49fdae973f Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Sep 2015 19:38:03 +0200 Subject: [PATCH] Add Iptables rules if dhclient is available. --- firewall | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/firewall b/firewall index 76a716e..564aa0f 100755 --- a/firewall +++ b/firewall @@ -191,10 +191,12 @@ fi # #### DNS (résolution de noms de domaines, ... ...) # $IPT -A OUTPUT -j ACCEPT -p udp -o ${ILAN} --dport 53 -m state --state NEW -m comment --comment "DNS out udp" # $IPT -A OUTPUT -j ACCEPT -p tcp -o ${ILAN} --dport 53 -m state --state NEW -m comment --comment "DNS out tcp" -# -# #### DHCP -# $IPT -A OUTPUT -j ACCEPT -p udp -o ${ILAN} -s "${IPLAN}" --sport 68 -m comment --comment "DHCPREQUEST" -# + +if [ $(command -v dhclient) ]; then + #### DHCP + $IPT -A OUTPUT -j ACCEPT -p udp -o ${ILAN} -s "${IPLAN}" --sport 68 -m comment --comment "DHCPREQUEST" +fi + # #### HTTP (maj, ...) # $IPT -A OUTPUT -j ACCEPT -p tcp -o ${ILAN} --dport 80 -m state --state NEW -m comment --comment "HTTP out" # $IPT -A OUTPUT -j ACCEPT -p tcp -o ${ILAN} --dport 443 -m state --state NEW -m comment --comment "HTTPS out"