P
P
PO6OT2016-09-14 20:27:16
linux
PO6OT, 2016-09-14 20:27:16

Forwarded 21 ports. An error occurs when connecting to FTP over WAN. The LAN address is fine. What to do?

The problem was solved by forwarding all ports from 1 to 65026, but this solution does not suit me. Is it possible to somehow solve everything only through port 21?
I can't upload the log right now. I think it's all clear.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2016-09-14
@woonem

Through one port it is impossible. FTP uses 21 ports for commands and a randomly generated port for data.
You can try to use the active mode on the client, then the client will open a data port on itself and transfer it to the server, and the server will already connect to this port. But this only works if the client is not behind NAT.
You can limit the range of ports to the server and forward only them, then you can use the passive mode on the client.

V
Vadim Yakovlev, 2016-09-14
@1nn0

If this is Linux, then you need to load the module
and add a rule like

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question