Error: No route to host

If you have questions on setting up the permissions of the FTP service, or want to know how to use it, post it here!

Moderators: Synology Inc, Honorary Moderator

Error: No route to host

Postby DataCrypt » Fri Jul 27, 2007 2:54 am

I'm trying to setup a backup application for a client so it will backup to my CS407 NAS drive. I believe I have everything setup correctly regarding port forwarding, security, etc... but each time I test the connection or try a backup I get the following error:

ERR Error while testing the FTP connection: Can't build data connection: No route to host.

It connects okay and even gets to the file share folder. I even see the file it creates, but it's 0 bytes as it failed to upload.

I'm using a different port other than 21 (using port 29). What does this error mean and what may I do to correct this?

Thank you very much,

DataCrypt

Edit: Ok, I got it to work, but I had to specify the ftp upload to use passive mode. Why wouldn't it work if I didn't specify passive mode. I also went ahead and forwarded the ports on my router for passive mode, which I had not done. But again I was not trying to upload using passive so I didn't think these ports were needed. Any information would be greatly appreciated.
User avatar
DataCrypt
Novice
Novice
 
Posts: 50
Joined: Tue Jul 24, 2007 6:47 pm

Postby Loeffel » Fri Jul 27, 2007 9:42 am

Hi,
as you used active ftp, have you also forwared port 20? Active FTP uses two ports!
Port 21 for connection and communication and port 20 for data transfer. So your program could communicate everything to make the transfer start, but the actual data couldn't be transfered, because port 20 was not available. (look into the RFC).

If you want forward to your NAS or make services available for your NAS it is important to forward, or just open all according ports on your router/firewall, that means:

20(TCP) - FTP-Data
21(TCP) - FTP
22(TCP) - Encrypted Network Backup
25(TCP) - SMTP (mail)
53(TCP) - Domain Name Service (name resolution)
67(UDP) - DHCP-Client (so the NAS can get an IP, normally that shouldn't be needed ;-) )
80(TCP) - HTTP (your normal website, you can define additional ports, make sure they don't interfere with existing ports)
123(UDP) - Network Time Protocol (time server)
137(UDP) - Netbios
138(UDP) - Netbios-Datagram
139(TCP) - Netbios-ssn
389(UDP/TCP) - LDAP (for ADS connection)
443(TCP) - HTTPS (your protected website)
445(UDP/TCP) - microsoft-ds, also named CIFS or mentioned as samba (shares of the NAS)
548(TCP) - AFP
873(TCP) - Network Backup / Encrypted Network Backup
989(TCP) - FTP-Data over TLS/SSL
990(TCP) - FTP over TLS/SSL
3689 - iTunes Media Service
5000(TCP) - Management Console / File Station / Audio Station
5001(TCP) - Secured Management Console / File Station / Audio Station
5432(UDP/TCP) - Download Redirector
5353 - iTunes Media Service
6881-6890(TCP) - BitTorrent (before firmware v2.0.1-3.0401 you also need the ports 6891-6999)
9997-9999(UDP) used by various Synology programs (Download Redirector / DSAssistant / Assistent / Data Replicator / USB Station Assistant)
9997-9999(TCP) Synology Download Redirector
55536-56559(UDP) - for passive FTP as long as not changed

For streaming you may need those port (perhaps more I don't know exactly what ports)
537 - Network Media Streaming Protocol
554 - Real Time Stream Protocol

Here you can find the port list at the synology FAQ (also see below). As you can see my list have some additional ports these ports are needed to give the NAS access to some services in the internet. So they just need to be opened not forwared. In the list of synology of can see which ports are used for which application.
I give no garantuee about the completeness, or corectness of this list!

@Franklin
Perhaps you can add the ports of my list that are needed for access of the NAS to the internet like NTP.





AFP 548 TCP
Synology DSAssistant 9999, 9998, 9997 UDP
Synology Assistant 9999, 9998, 9997 UDP
Synology USB Station Assistant 9999, 9998, 9997 UDP
Data Replicator 9999, 9998, 9997, 137, 138, 139, 445
Data Replicator II 9999, 9998, 9997, 137, 138, 139, 445
FTP, FTP over SSL, FTP over TLS 21 (command), 20 (Data connection in Active Mode), 55536~65535 (Data connection in Passive Mode) TCP
HTTP 80, 5000 TCP
Https 5001, 443 TCP
Photo Station
Web Station 80 (Changeable) TCP
Audio Station
File Station 5000 TCP
Network Backup 873 TCP
Encrypted Network Backup 873, 22 TCP
BitTorrent 6890 ~ 6999 (for models with firmware earlier than v2.0.1-3.0401);
6881 ~ 6890 (for models with firmware v2.0.1-3.0401 and onward ) TCP/UDP
Download Redirector 9999, 9998, 9997, 5432 UDP/TCP
CIFS
smbd 139 (netbios-ssn), 445 (microsoft-ds) TCP/UDP
Nmbd 137, 138 UDP
Yours
Loeffel

I will gather myself around my faith for light does the darkness most fear.
Murphy: Professionals are predictable, but beware the world is full of amateurs.
User avatar
Loeffel
Versed
Versed
 
Posts: 293
Joined: Sat Jun 09, 2007 6:42 am
Location: Germany

Thank you

Postby DataCrypt » Fri Jul 27, 2007 5:36 pm

Thanks Loeffel. Yes, I did have port 20 forwarded as well as 21. I was getting that "no route" error. I then decided to open up the passive ports too and it started working. I was just wondering why it wouldn't work with the active port rather than having to use passive. I'll play around with it some more tonight.

Thank you for the list of ports regarding the Synology functions.

Best Regards,

DataCrypt
User avatar
DataCrypt
Novice
Novice
 
Posts: 50
Joined: Tue Jul 24, 2007 6:47 pm

Postby Loeffel » Fri Jul 27, 2007 8:30 pm

Perhaps I can make some tests tomorrow, then I will have a look at it.

[edit]
Do you have your FTP program configured that it will never use passive FTP? I am using WS-FTP and if you don't deny it the use of passive FTP it will always switch to passive FTP and you can't transfer data. Directory listings etc. are ok, but you can't transfer. If you deny the use of passive FTP in the configuration even active FTP runs fine.
[/edit]
Yours
Loeffel

I will gather myself around my faith for light does the darkness most fear.
Murphy: Professionals are predictable, but beware the world is full of amateurs.
User avatar
Loeffel
Versed
Versed
 
Posts: 293
Joined: Sat Jun 09, 2007 6:42 am
Location: Germany

Cobian Backup

Postby DataCrypt » Fri Jul 27, 2007 11:39 pm

The application that I was using to send some backup data to the FTP on the Synology CS407 NAS is a small freeware application called Cobian Backup (http://www.educ.umu.se/~cobian/cobianbackup.htm). In it's FTP settings, there is a checkbox to enable or disable the usage of Passive transfers. I tried it unchecked by default and when doing a "test" it failed with the "no route" error. Once I checked it and forwarded the ports for passive mode on my router, it worked fine.

I'll try testing some tonight with FileZilla or WS_FTP Pro to get some more results. I appreciate you offering to test as well. If you want to try the Cobian Backup, it's free and easy to setup. Not the greatest program though and unfortunately has a 2GB limitation for FTP uploads.

Thanks again,

DataCrypt
User avatar
DataCrypt
Novice
Novice
 
Posts: 50
Joined: Tue Jul 24, 2007 6:47 pm

Postby Loeffel » Sun Jul 29, 2007 2:05 pm

My tests with WS-FTP Pro were successful, I have just forwarded 20 and 21.
If you would like to test it from your side, send me a PM, then I will enable a test account for you and give you my IP.
Yours
Loeffel

I will gather myself around my faith for light does the darkness most fear.
Murphy: Professionals are predictable, but beware the world is full of amateurs.
User avatar
Loeffel
Versed
Versed
 
Posts: 293
Joined: Sat Jun 09, 2007 6:42 am
Location: Germany

Postby Franklin » Wed Aug 08, 2007 2:45 am

FYI: It is not advisable to open AFP/CIFS ports to the router, doing so will compromise the data security of the sever.

@Loeffel
I added the iTunes Service ports to your list

This topic has been sticked
**Franklin is not available**
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**
Library ~ SynologyWiki ~ Synology FAQ ~ Compatibility Lists
Forum Links ~ Forum Policy ~ 3rd-party forums ~ Help us help you ~ Posting Images
Demo Links ~ DSM GUI ~ Photo Station
Downloads ~ Firmware Downloads ~ Beta Program
Support ~ Support Form ~ Submit Kernel ~ Synology eNews
User avatar
Franklin
Synology Inc
Synology Inc
 
Posts: 6772
Joined: Sat Oct 14, 2006 11:33 pm
Location: Washington, USA


Return to FTP Server

Who is online

Users browsing this forum: No registered users and 1 guest