We are using LEDE 17.01 on our embedded board. We would like to secure the "config files", "custom shell scripts" that are part of LEDE image. WE are looking into LUKS concept(cryptsetup) to create a loop container to mount the /etc/config folder into encrypted container. We are using the below steps to create the container and encrypt the folder. THe system is using JFFS2 filesystem .
dd if=/dev/zero of=/home/cryptfile bs=1M count=500 losetup /dev/loop0 /home/cryptfile cryptsetup -y luksFormat /dev/loop0 cryptsetup luksOpen /dev/loop0 crypt1 mkfs.ext3 -j /dev/mapper/crypt1 mount /dev/mapper/crypt1 /media/new
THe last step "mount" is failing showing as invalid argument. Also we are not able to compile mkfs.jffs2 to format the /dev/mapper/crypt1 as jffs2.
Can anybody help in providing how to secure the folders on LEDE based embedded routers using LUKS or any other means..