Hi,
On Sun, Jan 27, 2019 at 5:55 PM Pascal Hambourg <[email protected]>
wrote:
> Le 27/01/2019 à 16:29, Claudio M a écrit :
> >>
> >> auto eth0
> >> iface eth0 inet static
> >> address a.b.c.d
> >> netmask 255.255.255.224
> >> gateway c.d.e.f
> >> up route add -net a.b.c.x netmask 255.255.255.224 gw c.d.e.x dev eth0
>
> AFAIK, the gateway must be directly reachable on eth0. But c.d.e.x does
> not seem to belong to a.b.c.d/255.255.255.224.
>
It is, I just replaced the IPs with random(ish) letters
> >> up ip addr add f.g.h.i/32 dev eth0
> >> down ip addr del f.g.h.i /32 dev eth0
>
> Hackish. You can create a second inet stanza instead.
>
Good to know, thanks, doesn't really pose a problem in this case (I set it
up like my server provider suggested, just in case...).
>> post-up /etc/network/iptables.sh
>
> Is there a chance that this script returns a non zero value ?
>
Yes (also see below)
*post-up command*
> * Run command after bringing the interface up. If this command fails
> then ifup aborts, refraining from marking the interface as configured (even
> though it has really been configured), **prints an error message**, and
> exits with status 0. This behavior may change in the future. *
>
> >> iface eth0 inet6 static
> >> address 2a01:xxxx:xxxx:xxxx::2
> >> netmask 64
> >> gateway fe80::1
>
> What is the output of
>
> service networking status
>
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor
preset: enabled)
Active: failed (Result: timeout) since Sun 2019-01-27 20:45:15 CET; 1h
1min ago
Docs: man:interfaces(5)
Process: 489 ExecStart=/sbin/ifup -a --read-environment (code=killed,
signal=TERM)
Process: 480 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ]
&& [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm
settle (code=exited, status=0/SUCCESS)
Main PID: 489 (code=killed, signal=TERM)
CPU: 484ms
Jan 27 20:40:15 my-server systemd[1]: Starting Raise network interfaces...
Jan 27 20:40:20 my-server ifup[489]: Waiting for DAD... Done
Jan 27 20:45:15 my-server systemd[1]: networking.service: Start operation
timed out. Terminating.
Jan 27 20:45:15 my-server systemd[1]: networking.service: Main process
exited, code=killed, status=15/TERM
Jan 27 20:45:15 my-server systemd[1]: Failed to start Raise network
interfaces.
Jan 27 20:45:15 my-server systemd[1]: networking.service: Unit entered
failed state.
Jan 27 20:45:15 my-server systemd[1]: networking.service: Failed with
result 'timeout'.
>
> Did you try to swap the inet and inet6 stanzas ?
>
> I did, and it solved the assignment problem, but I guess it's the
iptables.sh script that's causing this.
I suppose I could try to replace it with nftables (we're going there
anyway...), but I guess in any case I need to start looking at a proper
firewall persistence thing (iptables-persistent or its netfilter
equivalent) rather than a shell script :/
Any advice?
@Ric Moore, nope, definitely eth0 (and @tomas is right, they're not devices
:) )
Thanks,
Claudio