Zentyal Forum, Linux Small Business Server
Zentyal Server => Other modules => Topic started by: barnum on April 14, 2023, 03:56:19 pm
-
Hi All,
Can someone tell where is located the network configuration that is use by ebox to generate the "/etc/network/interfaces" file
(in a database, a file, ....)
thanks
-
Hi,
There is a stub called 'interfaces.mas' located by default in '/usr/share/zentyal/stubs/network/' that manages the '/etc/network/interfaces' configuration file.
* https://doc.zentyal.org/en/appendix-c.html#stubs
Remember that if you do any changes in the stub, you will need to run the following command to apply the changes:
sudo zs network restart
--
“This world is ours, and by the Holy Light we will keep it safe, now and forever".
-
I already know that :) .
But my question is, when the zentyal network service start, where the scripts retrieve the interface name, the IP address to use, ....
Does those value are store in a database, in a file, ....
Barnum
-
Apparently, the interfaces name are gathered by the following function and passed as an argument to the stub 'interfaces.mas':
* https://github.com/zentyal/zentyal/blob/master/main/core/src/EBox/NetWrappers.pm#L83
Also, all the configurations you set in Zentyal GUI are stored in the Redis database, you can see all the configurations by running the following command:
sudo /usr/share/zentyal/redisvi
## For a particular module
sudo /usr/share/zentyal/redisvi network
--
“This world is ours, and by the Holy Light we will keep it safe, now and forever".
-
Thanks a lot for this information, I'll check
Barnum
-
It seems that I have old interface in the redis data, hox can I delete an interface in the redis database.
I have also more than 10 default gateways in redis, how can I delete some ?
Vincent
-
You shouldn't change anything in Redis itself, you must use the Zentyal GUI. If for some reason you need it, you could use the script '/usr/share/zentyal/clean-conf network that resets the module from scratch. I am not sure if there would be an issue due to the module dependencies. So, if you try it, make sure you did a backup of the server.
--
“This world is ours, and by the Holy Light we will keep it safe, now and forever".