# vsftp - login lan user using ftp

## emc

Hi,

I have problems to setup vsftp server (at server1) in lan network to allow upload snapshot pictures from cctv cam (same lan network) to server1 as user1. I can't  force vsftp use ftp since cctv does not support sftp. 

Additinaly nice to have is using sftp from WAN to download files.

Here is not working my vsftpd.conf:

```
write_enable=YES

dirmessage_enable=YES

nopriv_user=ftpsecure

local_enable=YES

local_umask=022

#chroot_local_user=YES

anonymous_enable=YES

anon_world_readable_only=YES

anon_upload_enable=YES

anon_umask=022

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

anon_root=/var/ftp

syslog_enable=YES

connect_from_port_20=YES

#pasv_enable=NO

pam_service_name=vsftpd

listen=YES

ssl_enable=NO

pasv_min_port=30000

pasv_max_port=30100
```

If I'm using sftp protocol I'm able to ftp from LAN and WAN

Any suggestion??

----------

## 666threesixes666

just to clarify things, Sftp is SSH file sharing.  vsftpd is very secure ftp daemon.  ftp runs 2 ports, not 1, you must forward both if behind a router.

if you are just sharing snapshots id go with http sharing over ftp.

----------

## emc

 *666threesixes666 wrote:*   

> just to clarify things, Sftp is SSH file sharing.  vsftpd is very secure ftp daemon.  ftp runs 2 ports, not 1, you must forward both if behind a router.
> 
> if you are just sharing snapshots id go with http sharing over ftp.

 

So, do I need forward port 21 and 22 on my router?

I don't get it "http sharing over ftp" what you really mean? My cctv cam can upload pictures to ftp or send by email, so I choose ftp.

----------

## 666threesixes666

20 	TCP 	UDP 	FTP data transfer 	Official

21 	TCP 		FTP control (command) 	Official

22 	TCP 	UDP 	Secure Shell (SSH) — used for secure logins, file transfers (scp, sftp) and port forwarding

ok let me re phrase this since i have a better idea of what your original meaning was.

https://wiki.gentoo.org/wiki/Vsftpd#Anonymous_read.2Fwrite_access <--- is what you want for the camera to push images to your linux box via ftp.

http is what you want to use to share to external networks/internet.

the wiki configuration is very insecure, but it works for random pushing of files from anyone.  (you might need a user on the computer, its been a while since i wrote it)  i designed the config for corporate team share file serving, and you will probably want to start with working and modify it to make it more secure.

----------

