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


Groups > linux.debian.user > #219443 > unrolled thread

ifup && iptables error

Started byWilliam Torrez Corea <willitc9888@gmail.com>
First post2020-02-25 23:40 +0100
Last post2020-02-26 23:20 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  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

#219443 — ifup && iptables error

FromWilliam Torrez Corea <willitc9888@gmail.com>
Date2020-02-25 23:40 +0100
Subjectifup && iptables error
Message-ID<zDR1T-6zB-11@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I get the following error message

[....] Configuring network interfaces...ifquery:
/etc/network/interfaces:19: unknown or no address type and no inherits
keyword specified
ifquery: couldn't read interfaces file "/etc/network/interfaces"
ifquery: /etc/network/interfaces:19: unknown or no address type and no
inherits keyword specified
ifquery: couldn't read interfaces file "/etc/network/interfaces"
ifup: /etc/network/interfaces:19: unknown or no address type and no
inherits keyword specified
ifup: couldn't read interfaces file "/etc/network/interfaces"
failed.
[ ok ] Cleaning up temporary files....
[ ok ] Setting up ALSA...done.
[ ok ] Setting sensors limits...done.
[....] Loading netfilter rules...run-parts: executing
/usr/share/netfilter-persistent/plugins.d/15-ip4tables start
Bad argument `COMMIT'
Error occurred at line: 4
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
run-parts: /usr/share/netfilter-persistent/plugins.d/15-ip4tables exited
with return code 2
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables
start
failed.

-- 
William Torrez Corea

[toc] | [next] | [standalone]


#219444

Fromdeloptes <deloptes@gmail.com>
Date2020-02-26 00:30 +0100
Message-ID<zDROi-75s-9@gated-at.bofh.it>
In reply to#219443
William Torrez Corea wrote:

> [....] Loading netfilter rules...run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
> Bad argument `COMMIT'
> Error occurred at line: 4
> Try `iptables-restore -h' or 'iptables-restore --help' for more
> information. run-parts:
> /usr/share/netfilter-persistent/plugins.d/15-ip4tables exited with return
> code 2 run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
> failed.

iptables changed to netfilter as default - could be that your issue is
related to that?
or you are missing somethe value and your scripts break

[toc] | [prev] | [next] | [standalone]


#219454

FromReco <recoverym4n@enotuniq.net>
Date2020-02-26 08:00 +0100
Message-ID<zDYPL-2Sg-3@gated-at.bofh.it>
In reply to#219443
	Hi.

On Tue, Feb 25, 2020 at 10:37:18PM +0000, William Torrez Corea wrote:
> I get the following error message
> 
> ifquery: /etc/network/interfaces:19: unknown or no address type and no
> inherits keyword specified

You have a syntax error at line 19 of your e/n/i.


> /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
> Bad argument `COMMIT'
> Error occurred at line: 4

And whatever is in /etc/iptables/rules.v4 - it's not a valid output of
iptables-save.


Now, to answer the question "what should I change there to get these
errors disappear" - the contents of both files are needed.

Reco

[toc] | [prev] | [next] | [standalone]


#219507

FromWilliam Torrez Corea <willitc9888@gmail.com>
Date2020-02-26 22:30 +0100
Message-ID<zEcpI-3LN-19@gated-at.bofh.it>
In reply to#219443

[Multipart message — attachments visible in raw view] — view raw

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





On Tue, Feb 25, 2020 at 10:37 PM William Torrez Corea <willitc9888@gmail.com>
wrote:

> I get the following error message
>
> [....] Configuring network interfaces...ifquery:
> /etc/network/interfaces:19: unknown or no address type and no inherits
> keyword specified
> ifquery: couldn't read interfaces file "/etc/network/interfaces"
> ifquery: /etc/network/interfaces:19: unknown or no address type and no
> inherits keyword specified
> ifquery: couldn't read interfaces file "/etc/network/interfaces"
> ifup: /etc/network/interfaces:19: unknown or no address type and no
> inherits keyword specified
> ifup: couldn't read interfaces file "/etc/network/interfaces"
> failed.
> [ ok ] Cleaning up temporary files....
> [ ok ] Setting up ALSA...done.
> [ ok ] Setting sensors limits...done.
> [....] Loading netfilter rules...run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
> Bad argument `COMMIT'
> Error occurred at line: 4
> Try `iptables-restore -h' or 'iptables-restore --help' for more
> information.
> run-parts: /usr/share/netfilter-persistent/plugins.d/15-ip4tables exited
> with return code 2
> run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
> failed.
>
> --
> William Torrez Corea
>


-- 
William Torrez Corea

[toc] | [prev] | [next] | [standalone]


#219537

FromReco <recoverym4n@enotuniq.net>
Date2020-02-27 12:10 +0100
Message-ID<zEpdf-3mo-3@gated-at.bofh.it>
In reply to#219507
	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

[toc] | [prev] | [next] | [standalone]


#219509

FromWilliam Torrez Corea <willitc9888@gmail.com>
Date2020-02-26 23:20 +0100
Message-ID<zEdc6-4iu-3@gated-at.bofh.it>
In reply to#219443

[Multipart message — attachments visible in raw view] — view raw

But when i modify the following file

/etc/iptables/rules.v4

# Generated by xtables-save v1.8.2 on Mon Aug  5 19:42:00 2019
*nat
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A OUTPUT -d 127.0.0.1/32 -j ACCEPT
-A OUTPUT -d 192.168.0.0/16 -j ACCEPT
-A OUTPUT -d 10.0.0.0/8 -j ACCEPT
-A OUTPUT -d 172.16.0.0/12 -j ACCEPT
#COMMIT
# Completed on Mon Aug  5 19:42:00 2019

The problem disappear.

This problem appear when i try to install the package git-all with apt.


On Tue, Feb 25, 2020 at 10:37 PM William Torrez Corea <willitc9888@gmail.com>
wrote:

> I get the following error message
>
> [....] Configuring network interfaces...ifquery:
> /etc/network/interfaces:19: unknown or no address type and no inherits
> keyword specified
> ifquery: couldn't read interfaces file "/etc/network/interfaces"
> ifquery: /etc/network/interfaces:19: unknown or no address type and no
> inherits keyword specified
> ifquery: couldn't read interfaces file "/etc/network/interfaces"
> ifup: /etc/network/interfaces:19: unknown or no address type and no
> inherits keyword specified
> ifup: couldn't read interfaces file "/etc/network/interfaces"
> failed.
> [ ok ] Cleaning up temporary files....
> [ ok ] Setting up ALSA...done.
> [ ok ] Setting sensors limits...done.
> [....] Loading netfilter rules...run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
> Bad argument `COMMIT'
> Error occurred at line: 4
> Try `iptables-restore -h' or 'iptables-restore --help' for more
> information.
> run-parts: /usr/share/netfilter-persistent/plugins.d/15-ip4tables exited
> with return code 2
> run-parts: executing
> /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
> failed.
>
> --
> William Torrez Corea
>


-- 
William Torrez Corea
Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)
x86_64 GNU/Linux

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web