{"description": "To set the runtime status of the <code>net.ipv4.conf.all.route_localnet</code> kernel parameter, run the following command: <pre>$ sudo sysctl -w net.ipv4.conf.all.route_localnet=0</pre>\nTo make sure that the setting is persistent, add the following line to a file in the directory <tt>/etc/sysctl.d</tt>: <pre>net.ipv4.conf.all.route_localnet = 0</pre>", "rationale": "Refuse the routing of packets whose source or destination address is the local loopback.\nThis prohibits the use of network 127/8 for local routing purposes.\nEnabling <tt>route_localnet</tt> can expose applications listening on localhost to external traffic.", "severity": "medium", "references": {"anssi": ["R12"]}, "control_references": {"anssi": ["R12"]}, "components": [], "identifiers": {}, "ocil_clause": "the correct value is not returned", "ocil": "The runtime status of the <code>net.ipv4.conf.all.route_localnet</code> kernel parameter can be queried\nby running the following command:\n<pre>$ sysctl net.ipv4.conf.all.route_localnet</pre>\n<code>0</code>.\n", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {}, "platform": null, "platforms": [], "sce_metadata": {"check-import": "stdout", "platform": ["multi_platform_all"], "environment": "any", "filename": "sysctl_net_ipv4_conf_all_route_localnet.sh", "relative_path": "ubuntu2204/checks/sce/sysctl_net_ipv4_conf_all_route_localnet.sh"}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Prevent Routing External Traffic to Local Loopback on All IPv4 Interfaces", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/network/network-kernel/network_host_and_router_parameters/sysctl_net_ipv4_conf_all_route_localnet/rule.yml", "template": {"name": "sysctl", "vars": {"sysctlvar": "net.ipv4.conf.all.route_localnet", "sysctlval": "0", "datatype": "int"}, "backends": {}}}