Skip to content

Commit

Permalink
[#97] Hotfix for ipv6
Browse files Browse the repository at this point in the history
This PR should be enough as a hotfix for #97.
  • Loading branch information
DT3264 authored and equetzal committed Jun 12, 2023
1 parent 8f22366 commit 5ad58b4
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions base-system/usrroot/usr/lib/hsync/libhfirewall.so
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

0 comments on commit 5ad58b4

Please sign in to comment.