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
-
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
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?
-
Hi Dersch,
You don't need stubs for this,
add your lines to '/etc/sysctl.conf', thats it!
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:
sudo sysctl -p
-
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?
-
yes, you are right, for '/etc/network/interfaces', you need stubs.
copy the original stub to customizable place:
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.
-
Ah ok, i need to read more about stubs. Seems not so complicated.
Here is my config:
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.
-
I checked the content of the interfaces.mas file. OK that's too complicated to understand for me :-\
-
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
-
Yes 4.2 and yes marked is the customisation
-
please check the 'br0' settings, the 'em2', missing the interface section 'iface em2 inet manual'.
-
Hi Julio, that's ok. It is working correctly like i posted.
-
ok, working, but missing...
backup your original '/etc/networking/interfaces' file and check with the attached file.
-
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?
-
not really correct...
the attached mas file in '/etc/zentyal/stubs/network' directory?
-
yes i included it
-
please check the '/var/log/zentyal/zentyal.log', you can see, the custom stubs applied?
-
oh access problems
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
-
Yes that was the problem. Thank you Julio!
-
i am glad to help you!
-
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.
-
please post the actualy /etc/network/interfaces file.
-
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
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
-
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
-
Hi Julio, will this stubs changes keep alive after upgrading to Zentyal 5 or will it be broken?