Ftp – How to connect ftp server outside lan

ftp

im setting up home ftp server, so i can share some files with my friends outside my lan. I am using filezilla server and everything configured. http://www.canyouseeme.org/ even see my port 21 as opend, but when i connect through fit client or through web browser, its saying "530 User saravana access denied."

how can i solve this problem, i checked the user name and password, everything is good, but i didnt sent any passive mode, (i didnt know how to set), if that is causing the trouble can anyone help me, bu the way i can connect locally through localhost.

    (000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> Connected, sending welcome message...
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220-FileZilla Server version 0.9.34 beta
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> USER anonymous
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 331 Password required for anonymous
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> PASS *******************
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 530 Login or password incorrect!
(000001) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> disconnected.
(000002) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> Connected, sending welcome message...
(000002) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220-FileZilla Server version 0.9.34 beta
(000002) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000002) 3/22/2010 16:56:04 PM - (not logged in) (192.168.1.9)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000002) 3/22/2010 16:56:09 PM - (not logged in) (192.168.1.9)> USER saravana
(000002) 3/22/2010 16:56:09 PM - (not logged in) (192.168.1.9)> 331 Password required for saravana
(000002) 3/22/2010 16:56:09 PM - (not logged in) (192.168.1.9)> PASS ********
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 230 Logged on
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> SYST
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 215 UNIX emulated by FileZilla
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> PWD
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 257 "/" is current directory.
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> TYPE I
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 200 Type set to I
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> PASV
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 227 Entering Passive Mode (192,168,1,9,212,191)
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> SIZE /
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> MDTM /
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> RETR /
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> PASV
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 227 Entering Passive Mode (192,168,1,9,212,193)
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> CWD /
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 250 CWD successful. "/" is current directory.
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> LIST
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 150 Connection accepted
(000002) 3/22/2010 16:56:09 PM - saravana (192.168.1.9)> 226 Transfer OK
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> PASV
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 227 Entering Passive Mode (192,168,1,9,212,196)
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> SIZE /favicon.ico
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> MDTM /favicon.ico
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> RETR /favicon.ico
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 550 File not found
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> PASV
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 227 Entering Passive Mode (192,168,1,9,212,198)
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> CWD /favicon.ico
(000002) 3/22/2010 16:56:11 PM - saravana (192.168.1.9)> 550 CWD failed. "/favicon.ico": directory not found.
(000002) 3/22/2010 16:56:14 PM - saravana (192.168.1.9)> disconnected.
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> Connected, sending welcome message...
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220-FileZilla Server version 0.9.34 beta
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> USER anonymous
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 331 Password required for anonymous
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> PASS *******************
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 530 Login or password incorrect!
(000003) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> disconnected.
(000004) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> Connected, sending welcome message...
(000004) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220-FileZilla Server version 0.9.34 beta
(000004) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000004) 3/22/2010 16:56:15 PM - (not logged in) (192.168.1.9)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000004) 3/22/2010 16:56:18 PM - (not logged in) (192.168.1.9)> USER saravana
(000004) 3/22/2010 16:56:18 PM - (not logged in) (192.168.1.9)> 331 Password required for saravana
(000004) 3/22/2010 16:56:18 PM - (not logged in) (192.168.1.9)> PASS ********
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 230 Logged on
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> SYST
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 215 UNIX emulated by FileZilla
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> PWD
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 257 "/" is current directory.
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> TYPE I
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 200 Type set to I
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> PASV
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 227 Entering Passive Mode (192,168,1,9,212,202)
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> SIZE /New Text Document.txt
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 213 5
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> MDTM /New Text Document.txt
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 213 20100322110559
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> RETR /New Text Document.txt
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 150 Connection accepted
(000004) 3/22/2010 16:56:18 PM - saravana (192.168.1.9)> 226 Transfer OK
(000004) 3/22/2010 16:58:18 PM - saravana (192.168.1.9)> 421 Connection timed out.
(000004) 3/22/2010 16:58:18 PM - saravana (192.168.1.9)> disconnected.

Best Answer

Considering everything you mentioned and info from your logs: you are trying to connect to your ftp server via your public address which is not correct. I will not go in details in packet routing and other things, just will tell in simple words:

  • public (WAN) address is for outside world
  • private (LAN) address is for corporate network

So, if you set up your ftp server, just use private address to connect to it, if it resides within your corporate network.
Or, if you really want to connect to it with the same public address, you need to set up routing tables on your router, so it will translate IP's to different addresses (so called NAT).