[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 9 network management



Dear Remigio,

your question was:
"Could you help me please to understand where are network configuration files and how to manage them?"

You can find the configuration files in /etc/NetworkManager/system-connections .
The files you can find here are profile files.
If you have one network card, and you use these in variable environments, than each of the environment is going to have an own profile.
It is good, because if you want to use DHCP in an environment but would like to have a static IP in another, you can have two profile files for the same network card and you can activate and deactivate the profile when the need raises with one easy move.

When you are not familiar with NetworkManager yet, you should use 'nmtui' for configuration. It will fill up your profile files with the correct syntax based on your settings. Just type in nmtui press enter, and you are in the network manager configuration.

If you have already some experience, you can switch to nmcli.
It has a huge advance compared to many other commands in linux. nmcli can use with TAB button. Just type in nmcli and you will get the options you can continue with (I tried and it works only if you log in user is root. If you su into root and try to use nmcli doesn't work. I think I will open my ticket into Gnome team who develops it.)
Don't seeing this little problem, I think it is a phantastic tool.

And if you will become expert, you can edit the profiles by hand in /etc/NetworkManager/system-connections.

The NetworkManager config lines used in profile files can be viewed in https://wiki.gnome.org/Projects/NetworkManager in Settings Reference section. Note, that the link which regards to Debian is nm-settings(5) which points to https://developer.gnome.org/NetworkManager/stable/nm-settings.html . Don't try nm-settings-ifcfg-rh(5) description, because it works only with RedHat and CentOS.

nm-settings(5) (the correct Debian description) is a bit buggie yet, I recently opened a ticket to manage some problems I have seen, but I was able already to find some solution when I really needed. So I encourage you and anyone to use it.

Hope this answer was useful.

- Tamas Fekete



2018-08-16 14:02 GMT+02:00 Reco <recoverym4n@gmail.com>:
        Hi.

On Thu, Aug 16, 2018 at 12:04:28PM +0200, Alessandro Vesely wrote:
> On Wed 15/Aug/2018 08:31:32 +0200 mick crane wrote:
> > On 2018-08-14 09:08, Remigio wrote:
> >> [...]
> >> Could you help me please to understand where are network configuration
> >> files and how to manage them?
> >
> > I too have been wondering about this and the wiki seems clear.
> > https://wiki.debian.org/NetworkConfiguration#Setting_up_an_Ethernet_Interface
>
> However, that doesn't cover how to properly coordinate setting up IP links,
> firewall, NAT, and netfilter daemons.

If you're using userspace daemons for netfilter then you're doing it
wrong. For instance, it has forced non-exsistent distinction between the
firewall, NAT and netfilter in your e-mail.

All these are merely the state of running kernel, and while you
certainly need userspace for configuring them, there's no need for any
userspace running for these things to function.

> IIRC it is possible, but difficult to make and maintain, and seemingly
> fragile.

A difficulty is in the eye of the beholder.

Reco



Reply to: