Skip to content

Commit

Permalink
Merge pull request #112 from hkcomori/icmp
Browse files Browse the repository at this point in the history
Accept only ping request for icmp
  • Loading branch information
geerlingguy authored Dec 30, 2024
2 parents 48e5ffa + e2bd06b commit e946e01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/firewall.bash.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ iptables -A INPUT -p udp -m udp --dport {{ port }} -j ACCEPT
{% endfor %}

# Accept icmp ping requests.
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

# Allow NTP traffic for time synchronization.
iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
Expand Down Expand Up @@ -109,7 +109,7 @@ if [ -x "$(which ip6tables 2>/dev/null)" ]; then
{% endfor %}

# Accept icmp ping requests.
ip6tables -A INPUT -p icmpv6 -j ACCEPT
ip6tables -A INPUT -p icmpv6 --icmpv6-type echo-request -j ACCEPT

# Allow NTP traffic for time synchronization.
ip6tables -A OUTPUT -p udp --dport 123 -j ACCEPT
Expand Down

0 comments on commit e946e01

Please sign in to comment.