diff --git a/Shorewall-perl/Shorewall/Compiler.pm b/Shorewall-perl/Shorewall/Compiler.pm index f72aac445..2a868e410 100644 --- a/Shorewall-perl/Shorewall/Compiler.pm +++ b/Shorewall-perl/Shorewall/Compiler.pm @@ -544,6 +544,15 @@ EOF 'progress_message2 IP Forwarding Disabled!' ); } + } else { + if ( $config{IP_FORWARDING} eq 'on' ) { + emit( 'echo 1 > /proc/sys/net/ipv6/config/all/forwarding', + 'progress_message2 IP Forwarding Enabled' ); + } elsif ( $config{IP_FORWARDING} eq 'off' ) { + emit( 'echo 0 > /proc/sys/net/ipv6/config/all/forwarding', + 'progress_message2 IP Forwarding Disabled!' + ); + } } emit 'run_stopped_exit'; diff --git a/Shorewall-perl/Shorewall/Proc.pm b/Shorewall-perl/Shorewall/Proc.pm index 3ce45b919..e36a12e60 100644 --- a/Shorewall-perl/Shorewall/Proc.pm +++ b/Shorewall-perl/Shorewall/Proc.pm @@ -210,6 +210,15 @@ sub setup_forwarding( $ ) { emit ''; } } else { + if ( $config{IP_FORWARDING} eq 'on' ) { + emit ' echo 1 > /proc/sys/net/ipv6/config/all/forwarding'; + emit ' progress_message2 IP Forwarding Enabled'; + } elsif ( $config{IP_FORWARDING} eq 'off' ) { + emit ' echo 0 > /proc/sys/net/ipv6/config/all/forwarding'; + emit ' progress_message2 IP Forwarding Disabled!'; + emit ''; + } + my $interfaces = find_interfaces_by_option 'forward'; if ( @$interfaces ) { diff --git a/Shorewall-perl/prog.functions6 b/Shorewall-perl/prog.functions6 index 396c72e22..4fcfc11bd 100644 --- a/Shorewall-perl/prog.functions6 +++ b/Shorewall-perl/prog.functions6 @@ -10,15 +10,7 @@ clear_firewall() { run_iptables -F - echo 1 > /proc/sys/net/ipv4/ip_forward - - if [ -n "$DISABLE_IPV6" ]; then - if qt mywhich ip6tables; then - ip6tables -P INPUT ACCEPT 2> /dev/null - ip6tables -P OUTPUT ACCEPT 2> /dev/null - ip6tables -P FORWARD ACCEPT 2> /dev/null - fi - fi + echo 1 > /proc/sys/net/ipv6/config/all/forwarding run_clear_exit