Last active
December 27, 2015 15:59
-
-
Save nk23x/7351313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## make users, directory structure, etc. | |
useradd ftpsecure -g users | |
mkdir /srv/ftp/data | |
mkdir /srv/ftp/data/alle | |
mkdir /srv/ftp/data/sta | |
chown -R :users /srv/ftp/data/alle | |
chmod g+w /srv/ftp/data/alle | |
chown -R sts:users /srv/ftp/data/sts | |
# ls /srv/ftp | |
# [drwxr-xr-x root users] /srv/ftp/data | |
# [drwxr-xr-x sts users] /srv/ftp/data/sts | |
# [drwxrwxr-x root users] /srv/ftp/data/alle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### /etc/vsftpd.conf | |
listen=NO | |
listen_ipv6=NO | |
anonymous_enable=NO | |
local_enable=YES | |
write_enable=YES | |
local_umask=022 | |
dirmessage_enable=YES | |
use_localtime=YES | |
connect_from_port_20=YES | |
xferlog_enable=YES | |
xferlog_file=/var/log/vsftpd.log | |
xferlog_std_format=YES | |
idle_session_timeout=600 | |
data_connection_timeout=120 | |
chroot_local_user=YES | |
ls_recurse_enable=YES | |
local_root=/srv/ftp/data | |
secure_chroot_dir=/var/run/vsftpd/empty | |
pam_service_name=vsftpd | |
rsa_cert_file=/etc/ssl/private/vsftpd.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### /etc/xinetd.d/ftp | |
service ftp | |
{ | |
socket_type = stream | |
wait = no | |
user = root | |
server = /usr/sbin/vsftpd | |
log_on_success += HOST DURATION | |
log_on_failure += HOST | |
disable = no | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see also: https://www.linuxnet.ch/automatic-tunnels-with-xinetd-and-netcat/ (because it's fun)