Zentyal Forum, Linux Small Business Server

Zentyal Server => Other modules => Topic started by: barnum on April 14, 2023, 03:56:19 pm

Title: Network Configuration
Post 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
Title: Re: Network Configuration
Post by: turalyon on April 17, 2023, 03:15:49 pm
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:

Code: [Select]
sudo zs network restart

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".
Title: Re: Network Configuration
Post by: barnum on April 17, 2023, 03:23:26 pm
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

Title: Re: Network Configuration
Post by: turalyon on April 18, 2023, 11:11:17 am
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:


Code: [Select]
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".
Title: Re: Network Configuration
Post by: barnum on April 19, 2023, 10:28:24 am
Thanks a lot for this information, I'll check

Barnum
Title: Re: Network Configuration
Post by: barnum on April 19, 2023, 10:40:29 am
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
Title: Re: Network Configuration
Post by: turalyon on April 19, 2023, 01:44:35 pm
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".