mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 14:40:08 +01:00
This is a tool for automatically configuring networking in azure cloud environment. This add a provider implementation for Azure that when detected fetches the private ip addressess and the subnet prefix of configured internal load balancers. Once this information is fetched from the metadata server, it instructs NetworkManager to add private ip addressess and subnet prefix for each interface detected. It is inspired by SuSE's cloud-netconfig ([1], [2]) and Azure Instance Metadata service [3]. [1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/ [2] https://github.com/SUSE-Enceladus/cloud-netconfig [3] https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service It is also intended to work without configuration. The main point is that you boot an image with NetworkManager and nm-cloud-setup enabled, and it just works. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/572
38 lines
915 B
SYSTEMD
38 lines
915 B
SYSTEMD
[Unit]
|
|
Description=Automatically configure NetworkManager in cloud
|
|
After=NetworkManager.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=@libexecdir@/nm-cloud-setup
|
|
|
|
#Environment=NM_CLOUD_SETUP_LOG=TRACE
|
|
|
|
# Cloud providers are disabled by default. You need to
|
|
# Opt-in by setting the right environment variable for
|
|
# the provider.
|
|
#Environment=NM_CLOUD_SETUP_EC2=yes
|
|
#Environment=NM_CLOUD_SETUP_GCP=yes
|
|
#Environment=NM_CLOUD_SETUP_AZURE=yes
|
|
|
|
CapabilityBoundingSet=
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
NoNewPrivileges=yes
|
|
PrivateDevices=yes
|
|
PrivateTmp=yes
|
|
ProtectControlGroups=yes
|
|
ProtectHome=yes
|
|
ProtectHostname=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectSystem=strict
|
|
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
RestrictSUIDSGID=yes
|
|
SystemCallFilter=@system-service
|
|
|
|
[Install]
|
|
WantedBy=NetworkManager.service
|