-
Notifications
You must be signed in to change notification settings - Fork 21
/
raspi-enc.sh
executable file
·50 lines (47 loc) · 1.14 KB
/
raspi-enc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#mount.sh
#!/bin/bash
cryptsetup luksOpen /dev/encdisk001 encpart
mount -t ext4 /dev/mapper/encpart /emocan
iptables -A INPUT -i wlan0 -p tcp --dport 21 -j DROP
iptables -A INPUT -i wlan0 -p tcp --dport 139 -j DROP
iptables -A INPUT -i wlan0 -p tcp --dport 445 -j DROP
service vsftpd start
service smbd start
#umount.sh
#!/bin/bash
service vsftpd stop
service smbd stop
find /emocan -name $"._*" -exec rm -rf {} \;
umount /emocan
cryptsetup luksClose encpart
#/etc/vsftpd.conf
listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
local_root=/emocan
allow_writeable_chroot=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
#/etc/samba/smb.conf
[shared]
comment = SharedArea
browsable = yes
read only = no
create mask = 0760
directory mask = 0760
valid users = pi
guest ok = no
path = /emocan