![]() |
Problems with vsftpd, SSL and FileZilla
Hi there...
Sorry for a long post.... I've set up an FTP-server running vsftpd on CentOS 5.5 and I want to use FileZilla to connect to it. Everything went just fine without SSL. But when I implemtented SSL it stopped working properly. However, the login works and I get the cert. It just won't list... Computer IP: 192.168.0.100 Server IP: 192.168.0.200 Now I can only connect from outside my router using Active Mode (even though I want to use Passive). This is what I get when connecting with different methods: -When I try to connect from my LAN (connecting to the servers private address) with Active mode: Kommando: PBSZ 0 -When I try to connect from my LAN (connecting to the servers private address) with Passive mode: Kommando: PBSZ 0 -When I try to connect from the outside (connecting to my domain-name) with Active mode (WORKS): Kommando: PBSZ 0 -When I try to connect from the outside (connecting to my domain-name) with Passive mode: Kommando: PBSZ 0 My vsftpd.conf: log_ftp_protocol=YES My /etc/sysconfig/iptables-config: IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp"My /etc/sysconfig/iptables # Firewall configuration written by system-config-securitylevel My routers port forwarding: http://data.fuskbugg.se/dipdip/ports.PNG Anyone got a clue whats wrong? I have a friend running the same thing and his work. The only thing different between him and me is basically the router |
Active FTP uses two TCP ports: 20 (data) and 21 (control). Your firewall rule set only shows port 21?
|
Quote:
I followed a guide then. I added a rule for 20 now but there was no difference |
In addition FTPS needs port TCP/990 (or that's what 'getent services ftps' says)?
[EDIT] (Not that that'll likely be all. My 'lftp' doesn't understand ftps:// and 'filezilla' seems unable to negotiate TLS: Code:
FTP response: Client "1.2.3.4", "220 (vsFTPd 2.0.5)"[/EDIT] |
I tried opening 990 to but there was no difference
Here are my iptables now: [root@Rorschach ~]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain RH-Firewall-1-INPUT (2 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftps ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50505 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50506 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50507 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50508 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50509 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:50510 ACCEPT all -- anywhere anywhere ACCEPT icmp -- anywhere anywhere icmp any ACCEPT esp -- anywhere anywhere ACCEPT ah -- anywhere anywhere ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns ACCEPT udp -- anywhere anywhere udp dpt:ipp ACCEPT tcp -- anywhere anywhere tcp dpt:ipp ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:40 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited The thing is that I use FTPES which seems to connect on port 21.... not FTPS that connect on 990 |
OK. Lets head back to "start". I'd suggest you
- use a FTP client I know will work with FTP, FTPS and FTPES but more importantly can display useful debug information: 'lftp'. How you run it in debug mode is explained in a recent thread about FTP debugging here: http://www.linuxquestions.org/questi...-hangs-847009/, - make Vsftpd log verbosely by adding these lines to your vsftpd.conf before restarting it: Code:
syslog_enable=NO- loosen up the port restrictions in your server 'sysctl -w net.ipv4.ip_local_port_range = 1025 65535' and replace 50505-50510 in the router with 20,21,1025-65535 (you added 20,21 to 192.168.0.200's UDP section) for the duration of the test. Now if you 'tail -f /var/log/xferlog /var/log/vsftpd.log /var/log/secure /var/log/messages' in one window (use 'screen'?) and run 'lftp -d -p 21 -u username [LAN|WAN]hostname' in another you should get a better view of what's happening wrt FTP behaviour. |
| All times are GMT -5. The time now is 02:42 AM. |