RE: ifup && iptables error

2020-03-23 Thread Bonno Bloksma
Hi,

[]
> Right, your basic problem is that your interfaces are now names
> enp7s0
> and
> wlp6s0
>
> not eth0 and wifi0 or whatever they used to be.
>
> Fix them in /etc/network/interfaces, double check your iptables rules 
> are either using the new names or don't mention interfaces at all, and 
> you should be relatively happy.

I was going to say or
Edit the file /etc/udev/rules. d/70-persistent-net and change the "stange 
names" back to their "proper name" but .
It seems that even though the /etc/udev/rules.d/ directory still exists, it is 
empty, no 70-persistent-net file present.
See https://wiki.debian.org/NetworkInterfaceNames why and how to get another 
set of predictable names like lan0 if you want that.

Bonno Bloksma



Re: ifup && iptables error

2020-03-20 Thread songbird
Dan Ritter wrote:
> William Torrez Corea wrote: 
>> When i execute show the following:
>> 
>> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode
>> DEFAULT group default qlen 1000
>> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> 2: enp7s0:  mtu 1500 qdisc pfifo_fast
>> state DOWN mode DEFAULT group default qlen 1000
>> link/ether e0:db:55:c2:58:45 brd ff:ff:ff:ff:ff:ff
>> 3: wlp6s0:  mtu 1500 qdisc noqueue state
>> UP mode DORMANT group default qlen 1000
>> link/ether 54:35:30:89:cd:f3 brd ff:ff:ff:ff:ff:ff
>> 
>> > 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.
>
> Right, your basic problem is that your interfaces are now names
> enp7s0
> and
> wlp6s0
>
> not eth0 and wifi0 or whatever they used to be.
>
> Fix them in /etc/network/interfaces, double check your iptables
> rules are either using the new names or don't mention interfaces
> at all, and you should be relatively happy.

  or boot with the param to the kernel

net.ifnames=0


  songbird



Re: ifup && iptables error

2020-03-20 Thread Dan Ritter
William Torrez Corea wrote: 
> When i execute show the following:
> 
> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode
> DEFAULT group default qlen 1000
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: enp7s0:  mtu 1500 qdisc pfifo_fast
> state DOWN mode DEFAULT group default qlen 1000
> link/ether e0:db:55:c2:58:45 brd ff:ff:ff:ff:ff:ff
> 3: wlp6s0:  mtu 1500 qdisc noqueue state
> UP mode DORMANT group default qlen 1000
> link/ether 54:35:30:89:cd:f3 brd ff:ff:ff:ff:ff:ff
> 
> > 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.

Right, your basic problem is that your interfaces are now names
enp7s0
and
wlp6s0

not eth0 and wifi0 or whatever they used to be.

Fix them in /etc/network/interfaces, double check your iptables
rules are either using the new names or don't mention interfaces
at all, and you should be relatively happy.

-dsr-



Re: ifup && iptables error

2020-03-20 Thread William Torrez Corea
When i execute show the following:

1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode
DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp7s0:  mtu 1500 qdisc pfifo_fast
state DOWN mode DEFAULT group default qlen 1000
link/ether e0:db:55:c2:58:45 brd ff:ff:ff:ff:ff:ff
3: wlp6s0:  mtu 1500 qdisc noqueue state
UP mode DORMANT group default qlen 1000
link/ether 54:35:30:89:cd:f3 brd ff:ff:ff:ff:ff:ff

On Tue, Feb 25, 2020 at 10:37 PM William Torrez Corea 
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


Re: ifup && iptables error

2020-03-18 Thread Dan Ritter
William Torrez Corea wrote: 
> Still don't get results positive. Now, i get the following message:
> 
> Internet Systems Consortium DHCP Client 4.4.1
> Copyright 2004-2018 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
> 
> can't create /var/lib/dhcp/dhclient.eth0.leases: No such file or directory
> Cannot find device "eth0"
> Failed to get interface index: No such device
> 
> If you think you have received this message due to a bug rather
> than a configuration issue please read the section on submitting
> bugs on either our web page at www.isc.org or in the README file
> before submitting a bug.  These pages explain the proper
> process and the information we find helpful for debugging.
> 
> exiting.
> ifup: failed to bring up eth0
> 

Run 

ip l

Does it show eth0? I bet it got renamed out from under you.

-dsr-



Re: ifup && iptables error

2020-03-17 Thread William Torrez Corea
Still don't get results positive. Now, i get the following message:

Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

can't create /var/lib/dhcp/dhclient.eth0.leases: No such file or directory
Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
ifup: failed to bring up eth0

1. Download https://www.isc.org/dhcp/
2. Configure, make, make install the source
3. Then install the dhcp configure https://wiki.debian.org/DHCP_Server but
in this point i am missing because don't recognise the isc-dhcp-server in
the system




On Tue, Feb 25, 2020 at 10:37 PM William Torrez Corea 
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


Re: ifup && iptables error

2020-02-27 Thread Reco
Hi.

On Wed, Feb 26, 2020 at 09:20:34PM +, 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



Re: ifup && iptables error

2020-02-26 Thread William Torrez Corea
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 
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


Re: ifup && iptables error

2020-02-25 Thread Reco
Hi.

On Tue, Feb 25, 2020 at 10:37:18PM +, 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



Re: ifup && iptables error

2020-02-25 Thread deloptes
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