ufw allow ssh
ufw allow 2222
ufw allow 6000:6007/udp
ufw allow from 203.0.113.4
ufw allow proto udp to any port 137 from 192.168.0.0/16
ufw allow proto udp to any port 138 from 192.168.0.0/16
ufw allow proto tcp to any port 139 from 192.168.0.0/16
ufw allow proto tcp to any port 445 from 192.168.0.0/16
Check all disks and what is what:
lsblk
Unmount all partitions of USB drive:
umount /dev/sdd*
Burn it:
dd if=./something.iso of=<your USB device> oflag=sync bs=4M status=progress
Eject it:
diskutil eject /dev/disk2
hdparm -tT /dev/sdd
/dev/sdd:
Timing cached reads: 39402 MB in 1.99 seconds = 19848.47 MB/sec
Timing buffered disk reads: 518 MB in 3.01 seconds = 172.19 MB/sec
Allow firewall rules
ufw allow from 192.168.0.1/24 to any port 111
ufw allow from 192.168.0.1/24 to any port 2049
ufw allow from 192.168.0.1/24 to any port 20048
Create exports Edit /etc/exports and add the directory you want to export
/data 192.168.0.1/24(rw,insecure,sync,no_subtree_check,all_squash,anonuid=65534,anongid=65534)
Options
- Allow read and write
- Doesn't care which source port requests come from
- Reply to requests only after the changes have been committed to stable storage
- disables subtree checking, which has mild security implications, but can improve reliability in some circumstances
- Map all uids and gids to the anonymous user
- NFS offers root squashing, a feature that maps uid 0 (root) to the anonymous (nfsnobody) uid, which defaults to -2 (65534 on 16 bit numbers)
- This is useful for windows clients that won't have matching UIDs
Enable NFS server (arch)
systemctl enable nfs-server.service systemctl start nfs-server.service
Refresh exports
exportfs -ra
Edit /etc/fstab
192.168.0.201:/data /mnt/my-local-dir nfs defaults,noatime,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min,x-systemd.after=network-online.target,nofail 0 0
More info https://wiki.archlinux.org/index.php/NFS
Get disk UUIDs
ls -lah /dev/disk/by-uuid/
Mount as user-accessible
UUID=3020-85D3 /mnt/external exfat defaults,noatime 0 0
fdisk /dev/sdi
g--> creates GUID partition table n --> creates new partition (press enter repeatedly to get full disk size) w --> write to disk
Afterwards format the partition using:
mkfs.exfat /dev/sdi1
mkfs.ext4 /dev/sdi1
exfatlabel /dev/sdi1 MY_LABEL
To make it compatible with macs:
sudo parted /dev/sdX
set 1 msftdata on
Note 1 is partition number ^
printf "${username}:`openssl passwd -apr1`\n" >> .htpasswd
On new PC:
Need to modify "compatibility.ini" from a new profile to ~/.mozilla/firefox/xxxxxx.default
Go to about:profiles, delete the new profile
pactl unload-module module-bluetooth-discover
pactl load-module module-bluetooth-discover