Zentyal Forum, Linux Small Business Server

Zentyal Server => Contributions / Tips&Tricks / Features Requests => Topic started by: Dersch on August 24, 2016, 09:35:52 am

Title: How to enable IPv6
Post by: Dersch on August 24, 2016, 09:35:52 am
Hi, i'm using IPv6. It is the standard today of course.

Unfortunatley Zentyal does not support IPv6 from the GUI.

So here you can enable it with SSH. Just replace em1 with your interface of choice.

In the /etc/network/interfaces you need to include

iface em1 inet6 auto

Code: [Select]
sysctl net.ipv6.conf.em1.disable_ipv6=0
sysctl net.ipv6.conf.em1.autoconf=1
sysctl net.ipv6.conf.em1.accept_ra=1
sysctl net.ipv6.conf.em1.accept_ra_defrtr=1

That is the manual way, it does not survive a reboot. How can you change this with stub files permanently?
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 10:04:49 am
Hi Dersch,

You don't need stubs for this,
add your lines to '/etc/sysctl.conf', thats it!
Code: [Select]
net.ipv6.conf.em1.disable_ipv6 = 0
net.ipv6.conf.em1.autoconf = 1
net.ipv6.conf.em1.accept_ra = 1
net.ipv6.conf.em1.accept_ra_defrtr = 1

After add, reload the sysctl with:
Code: [Select]
sudo sysctl -p
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 10:17:54 am
great! Thank you Julio. Always great help from your side!

But one question more about /etc/network/interfaces

I have a custom config with bridges. But after a reboot zentyal overwrite it with the gui settings.
I have to activate it manually. I think there i need stubs? How can i include permanently my custom settings?
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 11:00:05 am
yes, you are right, for '/etc/network/interfaces', you need stubs.

copy the original stub to customizable place:
Code: [Select]
sudo mkdir -p /etc/zentyal/stubs/network
sudo cp /usr/share/zentyal/stubs/network/interfaces.mas /etc/zentyal/stubs/network/interfaces.mas

add your custom things to the '/etc/zentyal/stubs/network/interfaces.mas',
but first please post your custom '/etc/network/interfaces' content.
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 11:02:56 am
Ah ok, i need to read more about stubs. Seems not so complicated.

Here is my config:

Code: [Select]
cat /etc/network/interfaces
auto lo em1 br0 br1 vlan13 vlan14 vlan15

iface lo inet loopback

iface em1 inet6 auto

iface em1 inet static
      address 192.168.10.1
      netmask 255.255.255.0
      broadcast 192.168.10.255


iface br1 inet manual
      bridge_ports p1p1
      bridge_fd 9
      bridge_hello 2
      bridge_maxage 12
      bridge_stp off


iface br0 inet static
      address 10.10.2.2
      netmask 255.255.255.0
      broadcast 10.10.2.255
      gateway 10.10.2.1
      bridge_ports em2
      bridge_stp off
      bridge_maxwait 0
      bridge_fd 0


iface vlan13 inet static
vlan-raw-device p1p2
      address 192.168.13.2
      netmask 255.255.255.0
      broadcast 192.168.13.255


iface vlan14 inet static
vlan-raw-device p1p2
      address 192.168.14.2
      netmask 255.255.255.0
      broadcast 192.168.14.255


The custom part is br0, br1 (for VM) and the IPv6 for em1.
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 11:49:31 am
I checked the content of the interfaces.mas file. OK that's too complicated to understand for me  :-\
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 01:26:24 pm
which zentyal version running on your server? 4.2?
custom part is this? (marked)

auto lo em1 br0 br1 vlan13 vlan14 vlan15

iface lo inet loopback

iface em1 inet6 auto

iface em1 inet static
      address 192.168.10.1
      netmask 255.255.255.0
      broadcast 192.168.10.255


iface br1 inet manual
      bridge_ports p1p1
      bridge_fd 9
      bridge_hello 2
      bridge_maxage 12
      bridge_stp off



iface br0 inet static
      address 10.10.2.2
      netmask 255.255.255.0
      broadcast 10.10.2.255
      gateway 10.10.2.1
      bridge_ports em2
      bridge_stp off
      bridge_maxwait 0
      bridge_fd 0



iface vlan13 inet static
vlan-raw-device p1p2
      address 192.168.13.2
      netmask 255.255.255.0
      broadcast 192.168.13.255


iface vlan14 inet static
vlan-raw-device p1p2
      address 192.168.14.2
      netmask 255.255.255.0
      broadcast 192.168.14.255
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 01:27:11 pm
Yes 4.2 and yes marked is the customisation
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 05:59:07 pm
please check the 'br0' settings, the 'em2', missing the interface section 'iface em2 inet manual'.
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 06:07:15 pm
Hi Julio, that's ok. It is working correctly like i posted.
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 06:11:58 pm
ok, working, but missing...

backup your original '/etc/networking/interfaces' file and check with the attached file.
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 07:36:50 pm
After the reboot all interfaces are still there and the vm started correctly as well.

But the /etc/network/interfaces is again reverted to the gui settings without my custom entries. Is that correct?
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 07:56:27 pm
not really correct...
the attached mas file in '/etc/zentyal/stubs/network' directory?
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 07:57:17 pm
yes i included it
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 08:13:27 pm
please check the '/var/log/zentyal/zentyal.log', you can see, the custom stubs applied?
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 09:45:09 pm
oh access problems

Code: [Select]
cat /var/log/zentyal/zentyal.log | grep /etc/zentyal/stubs/network/interfaces.mas
2016/08/24 19:34:09 INFO> Base.pm:1102 EBox::Module::Base::writeConfFileNoCheck - Using custom template for /etc/networ     k/interfaces: /etc/zentyal/stubs/network/interfaces.mas
2016/08/24 19:34:09 ERROR> Base.pm:1106 EBox::Module::Base::writeConfFileNoCheck - Falling back to default /usr/share/z     entyal/stubs/network/interfaces.mas due to exception when processing custom template /etc/zentyal/stubs/network/interfa     ces.mas: read_file: could not open file '/etc/zentyal/stubs/network/interfaces.mas' for reading: Keine Berechtigung
2016/08/24 20:00:21 INFO> Base.pm:1102 EBox::Module::Base::writeConfFileNoCheck - Using custom template for /etc/networ     k/interfaces: /etc/zentyal/stubs/network/interfaces.mas
2016/08/24 20:00:21 ERROR> Base.pm:1106 EBox::Module::Base::writeConfFileNoCheck - Falling back to default /usr/share/z     entyal/stubs/network/interfaces.mas due to exception when processing custom template /etc/zentyal/stubs/network/interfa     ces.mas: read_file: could not open file '/etc/zentyal/stubs/network/interfaces.mas' for reading: Keine Berechtigung
2016/08/24 20:10:28 INFO> Base.pm:1102 EBox::Module::Base::writeConfFileNoCheck - Using custom template for /etc/networ     k/interfaces: /etc/zentyal/stubs/network/interfaces.mas
2016/08/24 20:10:28 ERROR> Base.pm:1106 EBox::Module::Base::writeConfFileNoCheck - Falling back to default /usr/share/z     entyal/stubs/network/interfaces.mas due to exception when processing custom template /etc/zentyal/stubs/network/interfa     ces.mas: read_file: could not open file '/etc/zentyal/stubs/network/interfaces.mas' for reading: Keine Berechtigung


The owner is root

-rwxrwx--- 1 root root 1,6K Aug 24 19:23 /etc/zentyal/stubs/network/interfaces.mas

So i changed to chmod 0644, let's see
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 10:13:52 pm
Yes that was the problem. Thank you Julio!
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 10:15:25 pm
i am glad to help you!
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 10:47:25 pm
One problem remains :) now em1 don't get a public ipv6 anymore. Vlan13 and 14 get a public. Em1 only get a local v6. If i revert back from stubs em1 get a public v6.
Title: Re: How to enable IPv6
Post by: julio on August 24, 2016, 10:53:17 pm
please post the actualy /etc/network/interfaces file.
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 10:54:10 pm
Code: [Select]
cat /etc/network/interfaces
auto lo br0 br1 em1 vlan13 vlan14

iface lo inet loopback

iface em1 inet6 auto




iface em1 inet static
      address 192.168.10.1
      netmask 255.255.255.0
      broadcast 192.168.10.255





iface vlan13 inet static
vlan-raw-device p1p2
      address 192.168.13.2
      netmask 255.255.255.0
      broadcast 192.168.13.255


iface vlan14 inet static
vlan-raw-device p1p2
      address 192.168.14.2
      netmask 255.255.255.0
      broadcast 192.168.14.255


iface br1 inet manual
      bridge_ports p1p1
      bridge_fd 9
      bridge_hello 2
      bridge_maxage 12
      bridge_stp off


iface br0 inet static
      address 10.10.2.2
      netmask 255.255.255.0
      broadcast 10.10.2.255
      gateway 10.10.2.1
      bridge_ports em2
      bridge_stp off
      bridge_maxwait 0
      bridge_fd 0

Code: [Select]
em1       Link encap:Ethernet  Hardware Adresse 00:25:90:47:49:82
          inet Adresse:192.168.10.1  Bcast:192.168.10.255  Maske:255.255.255.0
          inet6-Adresse: fe80::225:90ff:fe47:4982/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:45289 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:25903 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX-Bytes:43810200 (43.8 MB)  TX-Bytes:2219600 (2.2 MB)
          Speicher:f7200000-f7280000
Title: Re: How to enable IPv6
Post by: Dersch on August 24, 2016, 11:01:23 pm
Sorry Julio, that was my problem of my pfsense....  :o

I had changed the RADVD by mistake today for the LAN interface where i wanted to change it at another place.

Everything is fine. Thanks for your help  ;D
Title: Re: How to enable IPv6
Post by: Dersch on February 17, 2017, 12:09:50 pm
Hi Julio, will this stubs changes keep alive after upgrading to Zentyal 5 or will it be broken?