Accéder au contenu principal

Articles

Affichage des articles du 2022

Linux: Create an encrypted filesystem inside a file

Create encrypted FS in a file #Create a file and allocate its size : here 1GB dd if=/dev/zero of=encrypteddrive bs=1024 count=1048576 #Setup the encrypted file cryptsetup -y luksFormat encrypteddrive (enter passphrase and confirm) #Open the Encrypted device sudo cryptsetup luksOpen encrypteddrive secretdata  (enter password)    #Create an EXT4 filesystem inside the encrypted file sudo mkfs.ext4 /dev/mapper/secretdata #Create a directory to be the mountpoint mkdir ../mp-encrypted #Mount the encrypted FS  sudo mount /dev/mapper/secretdata ../mp-encrypted/ #After use, unmount the encrypted FS and close the encrypted file sudo umount  ../mp-encrypted/ sudo cryptsetup luksClose secretdata Use: #To access Data, open the file and mount it sudo cryptsetup luksOpen encrypteddrive secretdata sudo mount /dev/mapper/secretdata ../mp-encrypted/ #To close after use, unmount the partition and close the file sudo umount  ../mp-encrypted/ sudo cryptsetup luksClose secretdata Resize the secret file file

GNS3 on Manjaro/Arch Linux: User groups

 For a basic usage of GNS3, some configuration is needed after you install "gns3" and "gns3-server" in your Manjaro or Arch Linux machine. Required group permissions for the linux user are "wireshark" (for using the live capture of packets) and "libvirt" (for using virtualization capabilities, required for example for NAT, as mentioned in the previous blog entry). Commands to execute are : sudo usermod -aG wireshark user sudo usermod -aG libvirt user replace "user" with your username for the Linux session. 

GNS3 on Manjaro/Arch Linux: How to create virbr0 for NAT to work

Problem: You can't add a NAT connection to your GNS3 simulation, and you get the error : "ERROR template_manager:226 Error while creating node from template: NAT interface virbr0 is missing, please install libvirt" Steps to resolve: 1- Create a file named /tmp/default.xml 2- Paste this content and save: <network>   <name>default</name>   <bridge name="virbr0"/>   <forward mode="nat"/>   <ip address="192.168.123.1" netmask="255.255.255.0">     <dhcp>       <range start="192.168.123.2" end="192.168.123.254"/>     </dhcp>   </ip> </network> 3- Execute the following commands in your shell : virsh net-define /tmp/default.xml sudo virsh net-start default sudo virsh net-autostart default  

Change of command in VyOS with FRR

 Based on this VyOS knowledge base article  , restarting the routing daemons, like OSPF, would be as easy as typing "restart ospf". But while working on a VyOS 1.3 appliance in GNS3, I couldn't simply do that : it turns out that VyOS now uses FRRouting, and this implies a new command syntax. The correct command to restart ospfd for example is now : "restart frr ospf". The same thing applies for other routing protocols.