Hi. On Wed, Feb 26, 2020 at 09:20:34PM +0000, William Torrez Corea wrote: > Exactly, i wan't reformulate the question. > > What should I change there to get these errors disappear? > > I'm trying to change some values for example in > > /etc/iptables/rules.v6 > > # Generated by xtables-save v1.8.2 on Mon Aug 5 19:42:00 2019 > *filter > :INPUT ACCEPT [0:0] > :FORWARD ACCEPT [0:0] > :OUTPUT ACCEPT [0:0] > # Bad argument > #COMMIT > # Completed on Mon Aug 5 19:42:00 2019 > > But i get the following error now when execute the following command > /usr/share/netfilter-persistent/plugins.d/25-ip6tables start > ip6tables-restore: COMMIT expected at line 8
It's not that you're not supposed to edit these files directly, but it's the lack of error checking that gives you this trouble. I suggest you to use iptables/ip6tables to edit your current netfilter rulesets, and use either /usr/share/netfilter-persistent/plugins.d/15-ip4tables save or /usr/share/netfilter-persistent/plugins.d/25-ip6tables save to generate the contents of the rules' files. I.e. iptables -A INPUT -p 22 -j ACCEPT /usr/share/netfilter-persistent/plugins.d/15-ip4tables save Reco