10 May, 2019

vsFTPD with chroot and Public IP with custom Port

Restricting to web directory


Group          :              ftpusers is a group
Username   :              xyz is user account that needs be jailed. User account configuration :
Create user account with these parameters for xyz 
Home Directory    /home/xyz
home directory should be own by root:ftpusers with chmod 755
e.g permission of /home is root:ftpusers and chmod 755

  • permission of /home/xyz is root:ftpusers and chmod 755
  • create a folder in /home/xyz/public_html
  • permission of upload should be xyz:ftpusers and chmod 755

VSFTPD Config

connect_from_port_20=YES

pam_service_name=vsftpd
userlist_enable=YES
pasv_promiscuous=YES

chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=NO
listen=YES
chmod_enable=NO
cmds_allowed=ABOR,QUIT,LIST,PASV,RETR,CWD,STOR,TYPE,PWD,SIZE,NLST,PORT,SYST,PRET,MDTM,DEL,MKD,RMD,DELE
listen_port=9221
pasv_enable=YES
#pasv_addr_resolve=YES
pasv_min_port=5000
pasv_max_port=5020


SSHD Config

Subsystem       sftp    /usr/libexec/openssh/sftp-server

Match User pb_ftp
        ChrootDirectory /home/xyz/public_html
        X11Forwarding no
        AllowTcpForwarding no


No comments:

Post a Comment

Redirection in IIS

 This config will redirect every request to https://www.domain.com <configuration>     <system.webServer>         <rewrite>...