Disable ipv6?

Security policy requires disabling ipv6 (including after reboots). How to disable ipv6 on eth0 link?


I have not actually had to do this, but it is fairly simple to alter the “/sys” files for this purpose (this is the same on all Ubuntu, and docs on the internet will apply equally to a Jetson). Here is one example URL:

Basically, there are files in subdirectories of “/sys”. These are not real files, but are actually content in RAM from device drivers and the kernel in general. Any “echo” of content into the correct place in “/sys/” is temporary until next boot. The corresponding way to enable or alter or disable a “/sys” feature is through the file “/etc/sysctl.conf”. There is also a related sysctl command which in turn also works with the conf file.

Note that in “/etc/sysctl.conf” that options listed like this are just an abbreviation to a subdirectory and/or file in “/sys” (this is just an example, it isn’t the exact line you want):
net.ipv6.conf.all.accept_source_route = 0

That line implies you could do the equivalent via echo of “0” to some file in a subdirectory in “/sys”, but in the conf file case, the change will persist across boots. The existence of the file depends on the driver existing. This would be passed directly to the driver.

appreciate the details. that wont work btw reboots. most of the ubuntu 18.04 docs recommend disabling in grub but jetpack doesn’t use grub.conf.

GRUB is for desktop PC architecture. You would instead pass arguments via the APPEND key/value pair in “/boot/extlinux/extlinux.conf”. GRUB requires a motherboard with a BIOS, and no such thing exists on embedded ARM.

Btw, an edit ending up in “/etc/sysctl.conf” is permanent so long as the entry is in that file. Using echo is only to test if it is what you want, and if it is, then using sysctl.conf is the way to go.

@linuxdev thank you for tip on extlinux.conf!

Added ipv6.disable=1 to the APPEND line, rebooted and IPv6 interfaces are disabled.