500 Illegal PORT
Řešení problému s připojováním klientů k ProFTPd serveru.
Za strany klienta se připojení chovalo takto:
257 „/“ is the current directory
Složka
TYPE A
200 Type set to A
PORT 192,168,1,100,196,12
500 Illegal PORT command
PASV
227 Entering Passive Mode (192,168,1,200,192,0).
PORT 192,168,1,100,196,16
500 Illegal PORT command
Řešení celého problému spočívá ve správném nastavení NATu a maškarády.
Popíšu zde způsob jak to má být správně nastaveno v případě následujího modelu:
INET – > Mikrotik with NAT -> ProFTPd server
Díky správné konfiguraci je naprosto bezchybný provoz. Na routeru je samozřejmě potřeba nastavit NAT (v případě, že ho využíváte). Pro aktivní režim forward portů 20-21 a pro pasivní režim vyčlenit porty např.: 49152 49155.
Na mikrotiku vypadá konfigurace takto:
Nyní náhled konfigurace ProFTPd serveru:
# Port 21 is the standard FTP port.
Port 21# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
PassivePorts 49152 49155# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
MasqueradeAddress 213.168.178.10