forked from extern/shorewall_code
Avoid ipv6 warnings
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1294 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
c0dccf9bc3
commit
126bfc23c4
@ -1169,12 +1169,16 @@ setup_forwarding() {
|
||||
# Disable IPV6
|
||||
#
|
||||
disable_ipv6() {
|
||||
if qt which ip6tables; then
|
||||
ip6tables -P FORWARD DROP && save_command ip6tables -P FORWARD DROP
|
||||
ip6tables -P INPUT DROP && save_command ip6tables -P INPUT DROP
|
||||
ip6tables -P OUTPUT DROP && save_command ip6tables -P OUTPUT DROP
|
||||
else
|
||||
error_message "WARNING: DISABLE_IPV6=Yes in shorewall.conf but this system does not appear to have ip6tables"
|
||||
local foo=$(ip -f inet6 addr ls 2> /dev/null)
|
||||
|
||||
if [ -n "$foo" ]; then
|
||||
if qt which ip6tables; then
|
||||
ip6tables -P FORWARD DROP && save_command ip6tables -P FORWARD DROP
|
||||
ip6tables -P INPUT DROP && save_command ip6tables -P INPUT DROP
|
||||
ip6tables -P OUTPUT DROP && save_command ip6tables -P OUTPUT DROP
|
||||
else
|
||||
error_message "WARNING: DISABLE_IPV6=Yes in shorewall.conf but this system does not appear to have ip6tables"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user