Skip to content

Commit

Permalink
added docker.io
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Jan 12, 2025
1 parent 289164a commit 0754295
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions docker/fxsupport/linux/firewall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,11 @@ is_valid_ipv6() {

valid_domains=(
"index.docker.io"
"hub.docker.com"
"registry-1.docker.io"
"docker.io"
"docker.com"
"hub.docker.com"
"docs.docker.com"
"registry-1.docker.io"
"production.cloudflare.docker.com"
"download.docker.com"
"github.com"
Expand Down Expand Up @@ -288,9 +291,18 @@ done
iptables -A INPUT -i docker0 -j ACCEPT
iptables -A OUTPUT -o docker0 -j ACCEPT

iptables -A INPUT -p tcp --dport 2375 -j ACCEPT
iptables -A INPUT -p tcp --dport 2376 -j ACCEPT

iptables -A OUTPUT -j DROP
iptables -A INPUT -j DROP

ip6tables -A INPUT -i docker0 -j ACCEPT
ip6tables -A OUTPUT -o docker0 -j ACCEPT

ip6tables -A OUTPUT -j DROP
ip6tables -A INPUT -j DROP

# Save rules
if ! iptables-save > /etc/iptables/rules.v4; then
echo "Failed to save IPv4 rules"
Expand Down
2 changes: 1 addition & 1 deletion docker/fxsupport/linux/fula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ function restart() {
fi

if [ ! -f ${SYSTEMD_PATH}/firewall.service ];then
setup_firewall || { echo "Error setting up firewall" | sudo tee -a $FULA_LOG_PATH; } || true
#setup_firewall || { echo "Error setting up firewall" | sudo tee -a $FULA_LOG_PATH; } || true
fi

setup_logrotate $FULA_LOG_PATH || { echo "Error setting up logrotate" | sudo tee -a $FULA_LOG_PATH; } || true
Expand Down

0 comments on commit 0754295

Please sign in to comment.