October 07 2022, 09:26#
Correct Way of Securing /tmp and /var/tmp in FreeBSD | The FreeBSD Forums
Sécuriser et monter /tmp
et /var/tmp
en mémoire (tmpfs)
kldload tmpfs
sysrc -f /boot/loader.conf tmpfs_load=YES
rm -rf /tmp /var/tmp
mkdir /tmp /var/tmp
mount -t tmpfs tmpfs -o rw,nosuid,noexec,mode=01777 /tmp
mount -t tmpfs tmpfs -o rw,nosuid,noexec,mode=01777 /var/tmp
Dans /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
tmpfs /tmp tmpfs rw,nosuid,noexec,mode=01777 0 0
tmpfs /var/tmp tmpfs rw,nosuid,noexec,mode=01777 0 0
Tags : freebsd linux unix tmpfs cybersécurité fstab