ip-config: Support configuring per-device IPv4 sysctl forwarding option
Add support for configuring per-interface IPv4 sysctl forwarding setting in NetworkManager. The feature allows users to configure the net.ipv4.conf.<interface>.forward setting directly through NetworkManager, enabling targeted forwarding configurations for interfaces. This is particularly useful for cases such as enabling forwarding for MetalLB load balancing without requiring a global ip_forward=1 setting. While forwarding setting can be managed via /etc/sysctl.conf, configuring sysctl options for dynamically created or software-configured interfaces (e.g., bridges) poses challenges. With this feature, NetworkManager can configure these settings when interfaces are created or updated, users no longer need to rely on nm-dispatcher scripts for per-interface sysctl configuration, which can be error-prone and complex. This feature ensures a more seamless and integrated way to manage per-interface forwarding configurations, reducing user overhead and improving usability in complex network setups. We do not support configuring per-device IPv6 sysctl forwarding because in order to make per-device IPv6 sysctl forwarding work, we also need to enable the IPv6 global sysctl forwarding setting, but this has potential security concerns because it changes the behavior of the system to function as a router, which expose the system to new risks and unintended traffic flows, especially when enabling forwarding on the interface the user previously explicitly disabled. Also enabling per-device IPv6 sysctl setting will change the behavior of router advertisement (accept_ra), which is not expected. Therefore, we only support configuring per-device IPv4 sysctl forwarding option in NetworkManager. Resolves: https://issues.redhat.com/browse/RHEL-60237 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2071 https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1833
This commit is contained in:
@@ -941,6 +941,10 @@ ipv6.ip6-privacy=0
|
||||
<term><varname>ip-tunnel.mtu</varname></term>
|
||||
<listitem><para>If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or a default of 1500.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>ipv4.forwarding</varname></term>
|
||||
<listitem><para>Whether to configure IPv4 sysctl interface-specific forwarding. When enabled, the interface will act as a router to forward the IPv4 packet from one interface to another. If left unspecified, "auto" is used, so NetworkManager sets the IPv4 forwarding if any shared connection is active, or it will use the kernel default value otherwise. The accepted values are: 0: disabled, 1: enabled, 2: auto, 3: ignored (leave the forwarding unchanged).</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>ipv4.routed-dns</varname></term>
|
||||
</varlistentry>
|
||||
|
@@ -2108,6 +2108,33 @@ _prop_get_ipvx_dhcp_send_hostname(NMDevice *self, int addr_family)
|
||||
return send_hostname_v2;
|
||||
}
|
||||
|
||||
static NMSettingIPConfigForwarding
|
||||
_prop_get_ipv4_forwarding(NMDevice *self)
|
||||
{
|
||||
NMSettingIPConfig *s_ip;
|
||||
NMSettingIPConfigForwarding forwarding;
|
||||
|
||||
g_return_val_if_fail(NM_IS_DEVICE(self), NM_SETTING_IP_CONFIG_FORWARDING_AUTO);
|
||||
|
||||
s_ip = nm_device_get_applied_setting(self, NM_TYPE_SETTING_IP4_CONFIG);
|
||||
if (s_ip)
|
||||
forwarding = nm_setting_ip_config_get_forwarding(s_ip);
|
||||
else
|
||||
forwarding = NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT;
|
||||
|
||||
if (forwarding == NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT) {
|
||||
forwarding =
|
||||
nm_config_data_get_connection_default_int64(NM_CONFIG_GET_DATA,
|
||||
NM_CON_DEFAULT("ipv4.forwarding"),
|
||||
self,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_NO,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_IGNORE,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_AUTO);
|
||||
}
|
||||
|
||||
return forwarding;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_prop_get_connection_ip_ping_addresses_require_all(NMDevice *self, NMSettingConnection *s_con)
|
||||
{
|
||||
@@ -13060,6 +13087,13 @@ activate_stage3_ip_config_for_addr_family(NMDevice *self, int addr_family)
|
||||
goto out_devip;
|
||||
|
||||
if (IS_IPv4) {
|
||||
NMSettingIPConfigForwarding ipv4_forwarding = _prop_get_ipv4_forwarding(self);
|
||||
|
||||
if (NM_IN_SET(ipv4_forwarding,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_NO,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_YES)) {
|
||||
nm_device_sysctl_ip_conf_set(self, AF_INET, "forwarding", ipv4_forwarding ? "1" : "0");
|
||||
}
|
||||
priv->ipll_data_4.v4.mode = _prop_get_ipv4_link_local(self);
|
||||
if (priv->ipll_data_4.v4.mode == NM_SETTING_IP4_LL_ENABLED)
|
||||
_dev_ipll4_start(self);
|
||||
|
@@ -2048,3 +2048,9 @@ global:
|
||||
nm_setting_ethtool_fec_mode_get_type;
|
||||
nm_ethtool_optname_is_fec;
|
||||
} libnm_1_50_0;
|
||||
|
||||
libnm_1_54_0 {
|
||||
global:
|
||||
nm_setting_ip_config_forwarding_get_type;
|
||||
nm_setting_ip_config_get_forwarding;
|
||||
} libnm_1_52_0;
|
||||
|
@@ -1712,6 +1712,10 @@
|
||||
dbus-type="as"
|
||||
gprop-type="GStrv"
|
||||
/>
|
||||
<property name="forwarding"
|
||||
dbus-type="i"
|
||||
gprop-type="gint"
|
||||
/>
|
||||
<property name="gateway"
|
||||
dbus-type="s"
|
||||
gprop-type="gchararray"
|
||||
@@ -1867,6 +1871,10 @@
|
||||
dbus-type="as"
|
||||
gprop-type="GStrv"
|
||||
/>
|
||||
<property name="forwarding"
|
||||
dbus-type="i"
|
||||
gprop-type="gint"
|
||||
/>
|
||||
<property name="gateway"
|
||||
dbus-type="s"
|
||||
gprop-type="gchararray"
|
||||
|
@@ -4009,7 +4009,8 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMSettingIPConfig,
|
||||
PROP_DHCP_SEND_RELEASE,
|
||||
PROP_ROUTED_DNS,
|
||||
PROP_SHARED_DHCP_RANGE,
|
||||
PROP_SHARED_DHCP_LEASE_TIME, );
|
||||
PROP_SHARED_DHCP_LEASE_TIME,
|
||||
PROP_FORWARDING, );
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE(NMSettingIPConfig, nm_setting_ip_config, NM_TYPE_SETTING)
|
||||
|
||||
@@ -5559,6 +5560,22 @@ nm_setting_ip_config_get_shared_dhcp_lease_time(NMSettingIPConfig *setting)
|
||||
return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->shared_dhcp_lease_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_ip_config_get_forwarding:
|
||||
* @setting: the #NMSettingIPConfig
|
||||
*
|
||||
* Returns: the #NMSettingIPConfig:forwarding property of the setting
|
||||
*
|
||||
* Since: 1.54
|
||||
**/
|
||||
NMSettingIPConfigForwarding
|
||||
nm_setting_ip_config_get_forwarding(NMSettingIPConfig *setting)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_SETTING_IP_CONFIG(setting), NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT);
|
||||
|
||||
return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->forwarding;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
verify_label(const char *label)
|
||||
{
|
||||
@@ -6337,6 +6354,13 @@ _nm_sett_info_property_override_create_array_ip_config(int addr_family)
|
||||
.direct_offset =
|
||||
NM_STRUCT_OFFSET_ENSURE_TYPE(gint32, NMSettingIPConfigPrivate, shared_dhcp_lease_time));
|
||||
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
obj_properties[PROP_FORWARDING],
|
||||
&nm_sett_info_propert_type_direct_enum,
|
||||
.direct_offset = NM_STRUCT_OFFSET_ENSURE_TYPE(int, NMSettingIPConfigPrivate, forwarding),
|
||||
.direct_data.enum_gtype = NM_TYPE_SETTING_IP_CONFIG_FORWARDING);
|
||||
|
||||
return properties_override;
|
||||
}
|
||||
|
||||
@@ -7120,6 +7144,32 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
||||
NM_SETTING_IP_CONFIG_ROUTED_DNS_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:forwarding:
|
||||
*
|
||||
* Whether to configure sysctl interface-specific forwarding. When enabled, the interface
|
||||
* will act as a router to forward the packet from one interface to another. When set to
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT, the value from global configuration is used;
|
||||
* if no global default is defined, %NM_SETTING_IP_CONFIG_FORWARDING_AUTO will be used.
|
||||
* The accepted values are:
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT: use global default.
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_NO: disabled.
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_YES: enabled.
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_AUTO: enable if any shared connection is active,
|
||||
* use kernel default otherwise.
|
||||
* %NM_SETTING_IP_CONFIG_FORWARDING_IGNORE: leave the forwarding unchanged.
|
||||
*
|
||||
* Since: 1.54
|
||||
*/
|
||||
obj_properties[PROP_FORWARDING] =
|
||||
g_param_spec_int(NM_SETTING_IP_CONFIG_FORWARDING,
|
||||
"",
|
||||
"",
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_IGNORE,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-send-hostname-v2:
|
||||
*
|
||||
|
@@ -193,6 +193,7 @@ typedef struct {
|
||||
int replace_local_rule;
|
||||
int dhcp_send_release;
|
||||
int routed_dns;
|
||||
int forwarding;
|
||||
int dhcp_send_hostname_v2;
|
||||
gint32 required_timeout;
|
||||
gint32 dad_timeout;
|
||||
|
@@ -4099,6 +4099,7 @@ test_connection_diff_a_only(void)
|
||||
{NM_SETTING_IP_CONFIG_ROUTED_DNS, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_IP_CONFIG_SHARED_DHCP_RANGE, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_IP_CONFIG_SHARED_DHCP_LEASE_TIME, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_IP_CONFIG_FORWARDING, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NULL, NM_SETTING_DIFF_RESULT_UNKNOWN},
|
||||
}},
|
||||
};
|
||||
|
@@ -53,6 +53,29 @@ typedef enum {
|
||||
NM_SETTING_IP_CONFIG_ROUTED_DNS_YES = 1,
|
||||
} NMSettingIPConfigRoutedDns;
|
||||
|
||||
/**
|
||||
* NMSettingIPConfigForwarding:
|
||||
* @NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT: use the global default value
|
||||
* @NM_SETTING_IP_CONFIG_FORWARDING_NO: disable forwarding
|
||||
* @NM_SETTING_IP_CONFIG_FORWARDING_YES: enable forwarding
|
||||
* @NM_SETTING_IP_CONFIG_FORWARDING_AUTO: enable forwarding if any shared
|
||||
* connection is active, use kernel default otherwise
|
||||
* @NM_SETTING_IP_CONFIG_FORWARDING_IGNORE: leave the forwarding unchanged
|
||||
*
|
||||
* #NMSettingIPConfigForwarding indicates whether to configure sysctl
|
||||
* interface-specific forwarding. When enabled, the interface will act
|
||||
* as a router to forward the packet from one interface to another.
|
||||
*
|
||||
* Since: 1.54
|
||||
*/
|
||||
typedef enum {
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT = -1,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_NO = 0,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_YES = 1,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_AUTO = 2,
|
||||
NM_SETTING_IP_CONFIG_FORWARDING_IGNORE = 3,
|
||||
} NMSettingIPConfigForwarding;
|
||||
|
||||
typedef struct NMIPAddress NMIPAddress;
|
||||
|
||||
GType nm_ip_address_get_type(void);
|
||||
@@ -364,6 +387,7 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule *self,
|
||||
#define NM_SETTING_IP_CONFIG_ROUTED_DNS "routed-dns"
|
||||
#define NM_SETTING_IP_CONFIG_SHARED_DHCP_RANGE "shared-dhcp-range"
|
||||
#define NM_SETTING_IP_CONFIG_SHARED_DHCP_LEASE_TIME "shared-dhcp-lease-time"
|
||||
#define NM_SETTING_IP_CONFIG_FORWARDING "forwarding"
|
||||
|
||||
/* these are not real GObject properties. */
|
||||
#define NM_SETTING_IP_CONFIG_ROUTING_RULES "routing-rules"
|
||||
@@ -542,6 +566,8 @@ NM_AVAILABLE_IN_1_52
|
||||
const char *nm_setting_ip_config_get_shared_dhcp_range(NMSettingIPConfig *setting);
|
||||
NM_AVAILABLE_IN_1_52
|
||||
int nm_setting_ip_config_get_shared_dhcp_lease_time(NMSettingIPConfig *setting);
|
||||
NM_AVAILABLE_IN_1_54
|
||||
NMSettingIPConfigForwarding nm_setting_ip_config_get_forwarding(NMSettingIPConfig *setting);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -6473,6 +6473,9 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = {
|
||||
),
|
||||
),
|
||||
),
|
||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_FORWARDING, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_FORWARDING,
|
||||
.property_type = &_pt_gobject_enum,
|
||||
),
|
||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME,
|
||||
.property_type = &_pt_gobject_string,
|
||||
),
|
||||
|
@@ -200,6 +200,7 @@
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_OPTIONS N_("DNS options for /etc/resolv.conf as described in resolv.conf(5) manual. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"ndots\", \"no-aaaa\", \"no-check-names\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". See the resolv.conf(5) manual. Note that there is a distinction between an unset (default) list and an empty list. In nmcli, to unset the list set the value to \"\". To set an empty list, set it to \" \". Currently, an unset list has the same meaning as an empty list. That might change in the future. The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added. The valid \"ipv4.dns-options\" and \"ipv6.dns-options\" get merged together.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("List of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_FORWARDING N_("Whether to configure sysctl interface-specific forwarding. When enabled, the interface will act as a router to forward the packet from one interface to another. When set to \"default\" (-1), the value from global configuration is used; if no global default is defined, \"auto\" (2) will be used. The accepted values are: \"default\" (-1): use global default. \"no\" (0): disabled. \"yes\" (1): enabled. \"auto\" (2): enable if any shared connection is active, use kernel default otherwise. \"ignore\" (3): leave the forwarding unchanged.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. Setting the gateway causes NetworkManager to configure a standard default route with the gateway as next hop. This is ignored if \"never-default\" is set. An alternative is to configure the default route explicitly with a manual route and /0 as prefix length. Note that the gateway usually conflicts with routing that NetworkManager configures for WireGuard interfaces, so usually it should not be set in that case. See \"ip4-auto-default-route\".")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured routes are ignored and only routes specified in the \"routes\" property, if any, are used.")
|
||||
@@ -235,6 +236,7 @@
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_OPTIONS N_("DNS options for /etc/resolv.conf as described in resolv.conf(5) manual. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"ndots\", \"no-aaaa\", \"no-check-names\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\" and \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"no-ip6-dotint\". See the resolv.conf(5) manual. Note that there is a distinction between an unset (default) list and an empty list. In nmcli, to unset the list set the value to \"\". To set an empty list, set it to \" \". Currently, an unset list has the same meaning as an empty list. That might change in the future. The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added. The valid \"ipv4.dns-options\" and \"ipv6.dns-options\" get merged together.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("List of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_FORWARDING N_("Whether to configure sysctl interface-specific forwarding. When enabled, the interface will act as a router to forward the packet from one interface to another. When set to \"default\" (-1), the value from global configuration is used; if no global default is defined, \"auto\" (2) will be used. The accepted values are: \"default\" (-1): use global default. \"no\" (0): disabled. \"yes\" (1): enabled. \"auto\" (2): enable if any shared connection is active, use kernel default otherwise. \"ignore\" (3): leave the forwarding unchanged.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. Setting the gateway causes NetworkManager to configure a standard default route with the gateway as next hop. This is ignored if \"never-default\" is set. An alternative is to configure the default route explicitly with a manual route and /0 as prefix length. Note that the gateway usually conflicts with routing that NetworkManager configures for WireGuard interfaces, so usually it should not be set in that case. See \"ip4-auto-default-route\".")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured routes are ignored and only routes specified in the \"routes\" property, if any, are used.")
|
||||
|
@@ -1402,6 +1402,10 @@
|
||||
nmcli-description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the dhcp-hostname property is NULL and this property is TRUE, the current persistent hostname of the computer is sent. The default value is default (-1). In this case the global value from NetworkManager configuration is looked up. If it's not set, the value from dhcp-send-hostname-deprecated, which defaults to TRUE, is used for backwards compatibility. In the future this will change and, in absence of a global default, it will always fallback to TRUE."
|
||||
format="choice (NMTernary)"
|
||||
values="default (-1), false/no (0), true/yes (1)" />
|
||||
<property name="forwarding"
|
||||
nmcli-description="Whether to configure sysctl interface-specific forwarding. When enabled, the interface will act as a router to forward the packet from one interface to another. When set to "default" (-1), the value from global configuration is used; if no global default is defined, "auto" (2) will be used. The accepted values are: "default" (-1): use global default. "no" (0): disabled. "yes" (1): enabled. "auto" (2): enable if any shared connection is active, use kernel default otherwise. "ignore" (3): leave the forwarding unchanged."
|
||||
format="choice (NMSettingIPConfigForwarding)"
|
||||
values="default (-1), no (0), yes (1), auto (2), ignore (3)" />
|
||||
<property name="dhcp-hostname"
|
||||
nmcli-description="If the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time."
|
||||
format="string" />
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user