Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vsftpd to localhost not working [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1080
Location: Tri-Cities, WA USA

PostPosted: Fri Jan 13, 2017 1:28 pm    Post subject: vsftpd to localhost not working [solved] Reply with quote

I have a new router and I can not even ftp to myself using my local ip 192.168.1.7 and 127.0..1
linksys 3200 . NAT is enabled. But I'm not even going through the router. I have a level 1 switch .

I've reset the vsftpd.conf and just set:
Code:

anonymous_enable=NO
local_enable=YES
write_enable=YES

Please throw me a bone.

Here is my tty session
Code:

$ ftp 192.168.1.7
Connected to 192.168.1.7 (192.168.1.7).
220 (vsFTPd 3.0.2)
Name (192.168.1.7:cwc): cwc
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
421 Service not available, remote server has closed connection
ftp> BYE
?Invalid command
ftp> bye
cwc@ciclo /home $ ftp 192.168.1.7
Connected to 192.168.1.7 (192.168.1.7).
220 (vsFTPd 3.0.2)
Name (192.168.1.7:cwc): cwc
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
500 OOPS: 421 Service not available, remote server has closed connection


$ ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 3.0.2)
Name (127.0.0.1:cwc): cwc
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
500 OOPS: 421 Service not available, remote server has closed connection


[Moderator edit: added [code] tags to preserve output layout. -Hu]
_________________
Without diversity there can be no evolution:)


Last edited by cwc on Tue Jan 17, 2017 12:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 808

PostPosted: Sat Jan 14, 2017 6:13 pm    Post subject: Reply with quote

you probably need to set some more options.
first thing i read in my working vsftpd.conf is:

Code:
# Listen on IPv4. xinet users must set NO or comment out
# otherwise it must be set YES
listen=YES

_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 808

PostPosted: Sat Jan 14, 2017 6:20 pm    Post subject: Reply with quote

(sorry, had to move to a different network for an ftpd with local users, my previous post was with anon users)
here is an uncommented config that works with local users, on of them is put into a chroot (username listed in /etc/vsftpd/users.chroot)
Code:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=NO
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
connect_from_port_20=YES
nopriv_user=ftp
async_abor_enable=NO
ftpd_banner= .: Angel's FTP-Service :.
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/users.chroot
allow_writeable_chroot=YES
ls_recurse_enable=YES
listen=YES
listen_ipv6=NO

note that there are many more options, a lot of them fun to work with.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1080
Location: Tri-Cities, WA USA

PostPosted: Mon Jan 16, 2017 12:09 am    Post subject: thanks DawgG Reply with quote

Thanks DawgG.
The config script worked.
How do you list the users in the
chroot_list_file=/etc/vsftpd/users.chroot
file.

I can oly get one user to login.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 808

PostPosted: Tue Jan 17, 2017 9:45 am    Post subject: Reply with quote

Quote:
How do you list the users in the
chroot_list_file=/etc/vsftpd/users.chroot
file.

just one username per line - but if you only allow local users to login they have to exist locally and must no be listed in /etc/ftpusers. as i said - vsftpd has lots of fun options not set in the default config. you can find them in the manpage.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum