LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't connect to any servers with any FTP client. (https://www.linuxquestions.org/questions/slackware-14/cant-connect-to-any-servers-with-any-ftp-client-733137/)

kslen 06-15-2009 03:07 PM

Can't connect to any servers with any FTP client.
 
Hello.

I can't connect to any FTP server regardless of which client I am using on my Slackware box. If I go to another computer it works just fine.

Code:

ftp> open ftp.start.no
ftp: connect: Connection timed out

The only thing I can think of is this:
I am getting an IP from the router with
Code:

dhcpcd -s 192.168.0.10 eth3
and the other machines are getting allocated addresses dynamically.

I can do pretty much anything except connect to FTP servers with the machine which has the issue. Is it possible that my Tilgin Vood 452w_B is the culprit? Glancing over the settings I can't see anything which should create such a block, as this machine is outside the DHCP pool (192.168.0.50-100) it could block "specific" traffic without letting me know about it. I dunno. I've been going over and over my configs and this is about to drive me insane.

/etc/HOSTNAME
Code:

crapola.lan
/etc/resolv.conf
Code:

nameserver 192.168.0.1
/etc/hosts
Code:

127.0.0.1      crapola.lan crapola
Any thoughts about where to start to untangle this?

MensaWater 06-15-2009 03:50 PM

It sounds like you're blocking the ftp port (port 21) outbound from your machine. The built in firewall for most Linux distros is iptables. You might try to stop iptables and test ftp. If it works then you'd need to restart iptables and add a rule to allow outbound port 21.

Most systems don't block outbound traffic - just inbound but its not impossible someone did block it outbound for some reason.

kslen 06-16-2009 08:58 PM

I'm running Slackware 12.2 and the firewall was the first thing to go when I noticed that I couldn't connect to FTP servers from this machine. :)

jmacloue 06-17-2009 12:52 AM

So, it's either DNS or firewall trouble. Try ping ftp.start.no - if it succeeds then your DNS is working. Then, try telnet'ing to FTP port with telnet ftp.start.no 21 - if it timeouts as well or shows "connection refused" then there is a firewall somewhere on the path. It may be your router but also it might be set up by your ISP for some reason.

kslen 06-17-2009 09:19 AM

Yep, I can ping it, but telnet is denied. I think I'll have to poke about in the Tilgin settings some more. Last time I had similar issues, I didn't at all get net when I asked specifically for the 192.168.0.10 IP via dhcpcd, but when I asked for a dynamic IP; full access to the interwebs was granted.

kslen 06-17-2009 09:20 AM

As mentioned, EVERYTHING but ftp is working. I'm currently using the troubled box to write these replies. Makes no frigging sense.

MensaWater 06-17-2009 10:49 AM

Quote:

Originally Posted by kslen (Post 3577155)
As mentioned, EVERYTHING but ftp is working. I'm currently using the troubled box to write these replies. Makes no frigging sense.

Which is why it seems extremely likely your issue is the ftp port is being blocked somewhere.

You can test the port by typing "telnet <ftphost> 21". That won't establish an ftp connection but will open port 21 if it isn't being blocked.

Post the command and results here.

By the way it worked for me:
Code:

telnet ftp.start.no 21
Trying 195.159.73.78...
Connected to ftp.start.no (195.159.73.78).
Escape character is '^]'.
220 (vsFTPd 2.0.5)

If it doesn't work for you try running "dig ftp.start.no" (or nslookup ftp.start.no if you don't have dig) and posting results.

business_kid 06-17-2009 02:23 PM

Let's recap - dns is OK, http is OK, ftp is not.

what's your ftp program? when I type
ls /usr/bin/*ftp
I get a few. And let's have the _exact_ error message you see in a terminal

ncftp is nice but it does mess up the odd anonymous login. nacftp or lftp work on ftp.heanet.ie

BTW this can be the server. There is a very conservayive MAXALLOWEDCLIENTS setting.Some servers only allow 5 and if you're number 6, you get the middle digit. Try off peak.

kslen 06-17-2009 02:33 PM

dig ftp.start.no
Code:

; <<>> DiG 9.4.3-P1 <<>> ftp.start.no
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21820
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; QUESTION SECTION:
;ftp.start.no.                  IN      A

;; ANSWER SECTION:
ftp.start.no.          900    IN      A      195.159.73.78

;; AUTHORITY SECTION:
start.no.              2476    IN      NS      dns2.powertech.no.
start.no.              2476    IN      NS      dns1.powertech.no.

;; ADDITIONAL SECTION:
dns1.powertech.no.      1895    IN      A      195.159.0.101
dns1.powertech.no.      2612    IN      AAAA    2001:840:101::
dns2.powertech.no.      3434    IN      A      195.159.0.201
dns2.powertech.no.      2612    IN      AAAA    2001:840:201::

;; Query time: 17 msec
;; SERVER: 10.82.16.1#53(10.82.16.1)
;; WHEN: Wed Jun 17 21:34:32 2009
;; MSG SIZE  rcvd: 182

nslookup ftp.start.no
Code:

Server:        192.168.0.1
Address:        192.168.0.1#53

Non-authoritative answer:
Name:  ftp.start.no
Address: 195.159.73.78

ls /usr/bin/*ftp
Code:

/usr/bin/gftp  /usr/bin/ncftp    /usr/bin/rftp  /usr/bin/tftp
/usr/bin/lftp  /usr/bin/obexftp  /usr/bin/sftp

I've tried everything from good old "ftp" to MC's client to the FireFTP addon for Firefox, every single one is denied on this specific machine, same clients elsewhere works just dandy no matter what time of day I try connecting on, so I doubt it is the server.

Thanks for all suggestions so far and keep em coming. :)

MensaWater 06-17-2009 03:38 PM

Your dig output shows you're resolving the same IP as I am here,

I don't see where you tried the telnet to port 21. Can you do that and post output?

kslen 06-17-2009 03:44 PM

Quote:

Yep, I can ping it, but telnet is denied. I think I'll have to poke about in the Tilgin settings some more. Last time I had similar issues, I didn't at all get net when I asked specifically for the 192.168.0.10 IP via dhcpcd, but when I asked for a dynamic IP; full access to the interwebs was granted.
No error reply, just a timeout.

Code:

telnet ftp.start.no 21                                                               
Trying 195.159.73.78...
telnet: connect to address 195.159.73.78: Connection timed out


MensaWater 06-17-2009 03:53 PM

Well we know the port on that IP works since I could get to it from here.

That means either something in your route to host is blocking port 21 (since you can ping and do other things) or they are specifically blocking your IP (or the range it is isn) for some reason.

What part of the world are you doing this in? Many people routinely block all IPs from various countries (e.g. China, North Korea, Russia) if they don't have reason to go there all the time. I see they are in Norway.

kslen 06-17-2009 04:52 PM

I can connect from other machines using the same software through the very same local network. It isn't just this specific server, it's all servers. Only thing that differ is the way I get an IP from the DHCP server on my local network. *shrugs*

kslen 06-17-2009 05:01 PM

Yep, didn't bother checking wether or not this was the very same issue I had earlier. Just seemed obvious somehow.

Anyways. I told the dhcp server to give me an IP within the pool specified..

Code:

> dhcpcd -s 192.168.0.65 eth3                                                         
Broadcasting DHCP_INFORM for 192.168.0.65
broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255
dhcpIPaddrLeaseTime option is missing in DHCP server response. Assuming 4294967295 sec
dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec
dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec
DHCP_ACK received from  (192.168.0.1)
Broadcasting ARPOP_REQUEST for 192.168.0.65

> ftp ftp.start.no                                                                     
Connected to ftp.start.no.
220 (vsFTPd 2.0.5)
Name (ftp.start.no:tilgineatmycrotch):

And then..
Code:

> dhcpcd -s 192.168.0.10 eth3                                                           
Broadcasting DHCP_INFORM for 192.168.0.10
broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255
dhcpIPaddrLeaseTime option is missing in DHCP server response. Assuming 4294967295 sec
dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec
dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec
DHCP_ACK received from  (192.168.0.1)
Broadcasting ARPOP_REQUEST for 192.168.0.10

> ftp ftp.start.no
ftp: connect: Connection timed out

It's the bastard Tilgin Vood 452w_B as I first suspected indeed.

mRgOBLIN 06-17-2009 05:07 PM

<deleted>

no matter it seems you tried what I was suggesting :)


All times are GMT -5. The time now is 06:59 PM.