2
Today I was trying to set up an FTP server for my friend and myself. Server is in my home so I have no problem accessing it locally, but I am unable to open it to public. For my server configuration it is FileZilla server running on Windows 7 machine. I have disabled all firewalls so nothing is blocking it for now and I am able to connect to it in my local network.
What I have tried when it comes to opening it to local (on MikroTik router): I have created a firewall NAT rule to forward from my public IP address and port 776 to the server IP address on port 21 and what I get from FileZilla when trying to connect from external network:
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (31,134,50,169,198,229)
Command: MLSD
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
Response: 425 Can't open data connection for transfer of "/"
Error: Failed to retrieve directory listing
So as I see I am able to connect but can't actually read files. I know that there is this 'Passive Mode' problem, but from what I have read it is occurring when trying to connect, so it is not on me anymore? Correct me if I am wrong please.
I was also using this site to test for everything but it showed errors. I am new to this kind of stuff and not very skilled when it comes to setting up connections.
This question [from ServerFault] is talking about this stuff too, but I am unable to make it work. If anyone can explain to me step by step what do I do, please.
EDIT:
FileZilla output:
Command: MLSD
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
Response: 425 Can't open data connection for transfer of "/"
Error: Failed to retrieve directory listing
My NAT rule that forwards from my router IP and port 776 to server local port 21:
NAT rules that I have added to accept inbound and out traffic:
please see attached 3 pictures of what I have. I added that inbound and outbound accept but I guess it is not correct as it is still not working. I also addded my output from filezilla – user1031296 – 2019-05-03T20:12:37.857
I found this article that may compliment, and add a few other things to check for. Try the part where it says: This usually happens, when the server is not aware of its external IP address and reports its internal IP address.: https://stackoverflow.com/questions/43758580/filezilla-the-data-connection-could-not-be-established-econnrefused-connec
– Luis Alberto Barandiaran – 2019-05-03T20:38:46.000I ahve tried the article but yeah, still got something wrong. I was hoping for it to be a quick and painless experience, but I will wrap my head around these two links, maybe they can provide some information I can understand. Thank you for your help, I will write if something changes
okay so after some configuration something hit my head. When doing all this stuff described in these links, do I need these ports on my NAT router to be opened? I mean my ISP have open ports in range of 770-790 in my router so I can use them for varius purposes. So assuming that these other ports are not 'open', will I not be able to forward packets through them?? – user1031296 – 2019-05-03T22:29:30.957
Yes! When I said firewall I meant both in your router, your PC, and if you have anything in between. Did that fix it? – Luis Alberto Barandiaran – 2019-05-05T02:25:59.237