From 5ad58b45db827a55c2d64b9563dc8363a0fa6728 Mon Sep 17 00:00:00 2001 From: Daniel Cerna Date: Mon, 12 Jun 2023 11:45:56 -0600 Subject: [PATCH] [#97] Hotfix for ipv6 This PR should be enough as a hotfix for #97. --- .../usrroot/usr/lib/hsync/libhfirewall.so | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/base-system/usrroot/usr/lib/hsync/libhfirewall.so b/base-system/usrroot/usr/lib/hsync/libhfirewall.so index 4f2d8f01..4eca32e0 100755 --- a/base-system/usrroot/usr/lib/hsync/libhfirewall.so +++ b/base-system/usrroot/usr/lib/hsync/libhfirewall.so @@ -76,8 +76,21 @@ firewall_accept_all() { iptables -X iptables -Z + # Allow all incoming and outgoing IPv6 traffic + ip6tables -P INPUT ACCEPT + ip6tables -P OUTPUT ACCEPT + ip6tables -P FORWARD ACCEPT + log "Setting firewall rules to: - $(iptables --list)" + ############## + ### IPv4 ### + ############## + $(iptables --list) + ############## + ### IPv6 ### + ############## + $(ip6tables --list) + " return 0 } @@ -150,7 +163,13 @@ firewall_filter_ipv4() { } firewall_filter_ipv6() { - #TODO: Implement + # TODO(https://github.com/equetzal/huronOS-build-tools/issues/97): + # Implement same logic as with ipv4 instead of all or none + + # Drop all incoming and outgoing IPv6 traffic + ip6tables -P INPUT DROP + ip6tables -P OUTPUT DROP + ip6tables -P FORWARD DROP return 0 } @@ -161,7 +180,15 @@ firewall_accept_filtered_web() { firewall_filter_ipv6 log "Setting firewall rules to: - $(iptables-legacy --list)" + ############## + ### IPv4 ### + ############## + $(iptables --list) + ############## + ### IPv6 ### + ############## + $(ip6tables --list) + " return 0 }