Answer the question
In order to leave comments, you need to log in
How to properly configure an Ubuntu/Linux gateway to allow FTP traffic to pass through it?
Ubuntu 16.04 with Gnome GUI is installed on the computer in order to set up a gateway on it for Internet traffic to pass through it. I must say right away that I am new to Linux, as such, I have not dealt with Ubuntu before, as well as Linux in general. I read articles on the Internet on setting up port forwarding so that traffic goes between two network interfaces. So everything works well, devices inside the network behind this server have access to the Internet. There was another problem. The fact is that within the local network itself there is a router to which a USB hard drive is connected, the TP-Link Archer C50 router. Before I started raising the server, this particular router worked as a gateway, and its FTP server could be accessed both from the local network and from the external one, indicating the white address issued by the provider. Now, I don't quite understand why. but inside the local network everything works just as well, but from the outside I can already connect to the FTP server of the local router, but I am informed about the problem of listing folders on the server. Here is my current IPTables configuration:
Server sent passive reply with unroutable address 192.168.0.1, using host address instead.
The transmission channel cannot be opened. Cause: The connection was not established because the destination computer denied the connection request.
(000009)25.07.2018 18:40:28 - user (192.168.0.2)> STAT
(000009)25.07.2018 18:40:28 - user (192.168.0.2)> 500 Syntax error, command unrecognized.
(000009)25.07.2018 18:40:28 - user (192.168.0.2)> SYST
(000009)25.07.2018 18:40:28 - user (192.168.0.2)> 215 UNIX emulated by FileZilla
(000009)25.07.2018 18:40:28 - user (192.168.0.2) > PASV
(000009) 07/25/2018 18:40:28 - user (192.168.0.2) > 227 Entering Passive Mode (192,168,0,3,250,221)
Answer the question
In order to leave comments, you need to log in
FTP is a very old protocol developed during the "secure internet" era which ended around 2004... It has two ports and two directions of traffic - a control port and a data port. And two modes - active and passive. Port 21 is the control port, commands are issued on it. But all the data, even the contents of the folders, is transmitted over port 20 - ftp-data. And just then the piano is playing - active or passive (lieutenants, be silent!).
The active server gives the client a port on which it will connect to the client and transmit data. Passive waits for a port from the client, but it will still connect itself.
FTP is a chore. 20 more and gt 1024 ports are needed there, depending on the connection mode (active, passive)
To simplify, dig in the direction of nf_conntrack.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question