[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables config resets after restarting system



Le 10/08/2018 à 22:29, Hubert Hauser a écrit :

echo " * allowing ping responses"
${IPTABLES} -A INPUT -p ICMP -j ACCEPT

${IP6TABLES} -A INPUT -p ICMPv6 -j ACCEPT

Replies to unicast echo requests have the ESTABLISHED state. So you don't need an extra rule to accept them, unless you are sending echo requests to broadcast or anycast addresses.

Besides, theses rules accept not accept echo-reply but also ANY ICMP or ICMPv6 type, including echo-request.

echo -e " * SAVING RULES\n"

iptables-save > /etc/iptables/rules.v4
iptables-apply /etc/iptables/rules.v4

ip6tables-save > /etc/iptables/rules.v6
ip6tables-apply /etc/iptables/rules.v6

echo -e "\n * DONE!\n"

Here's my iptables config before restarting system:

(...)

And after restarting system:

(a few differences)

Running command fwall-rules after restarting system works. What am I
doing wrong?

How do yo restore the ruleset at startup ?
Are you using the same file ?


Reply to: