Author Topic: Network Configuration  (Read 1962 times)

barnum

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Network Configuration
« 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

turalyon

  • Zen Warrior
  • ***
  • Posts: 204
  • Karma: +15/-0
    • View Profile
Re: Network Configuration
« Reply #1 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".

barnum

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Network Configuration
« Reply #2 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


turalyon

  • Zen Warrior
  • ***
  • Posts: 204
  • Karma: +15/-0
    • View Profile
Re: Network Configuration
« Reply #3 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".

barnum

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Network Configuration
« Reply #4 on: April 19, 2023, 10:28:24 am »
Thanks a lot for this information, I'll check

Barnum

barnum

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Network Configuration
« Reply #5 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

turalyon

  • Zen Warrior
  • ***
  • Posts: 204
  • Karma: +15/-0
    • View Profile
Re: Network Configuration
« Reply #6 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".