Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #219537

Re: ifup && iptables error

From Reco <recoverym4n@enotuniq.net>
Newsgroups linux.debian.user
Subject Re: ifup && iptables error
Date 2020-02-27 12:10 +0100
Message-ID <zEpdf-3mo-3@gated-at.bofh.it> (permalink)
References <zDR1T-6zB-11@gated-at.bofh.it> <zEcpI-3LN-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ifup && iptables error William Torrez Corea <willitc9888@gmail.com> - 2020-02-25 23:40 +0100
  Re: ifup && iptables error deloptes <deloptes@gmail.com> - 2020-02-26 00:30 +0100
  Re: ifup && iptables error Reco <recoverym4n@enotuniq.net> - 2020-02-26 08:00 +0100
  Re: ifup && iptables error William Torrez Corea <willitc9888@gmail.com> - 2020-02-26 22:30 +0100
    Re: ifup && iptables error Reco <recoverym4n@enotuniq.net> - 2020-02-27 12:10 +0100
  Re: ifup && iptables error William Torrez Corea <willitc9888@gmail.com> - 2020-02-26 23:20 +0100
  Re: ifup && iptables error William Torrez Corea <willitc9888@gmail.com> - 2020-03-18 02:20 +0100
    Re: ifup && iptables error Dan Ritter <dsr@randomstring.org> - 2020-03-18 15:00 +0100
  Re: ifup && iptables error William Torrez Corea <willitc9888@gmail.com> - 2020-03-20 20:20 +0100
    Re: ifup && iptables error Dan Ritter <dsr@randomstring.org> - 2020-03-20 21:20 +0100
      Re: ifup && iptables error songbird <songbird@anthive.com> - 2020-03-21 00:40 +0100

csiph-web