Koozali.org: home of the SME Server

FTP server behind NAT router

Offline fosdyke

  • 13
  • +0/-0
FTP server behind NAT router
« on: March 01, 2006, 11:27:33 PM »
I am having a problem trying to access i-bays via ftp on an SME server behind a NAT router.

I have enabled all ftp settings, but still get "server refused connection" error when attempting connection with an ftp client. I have forwarded ports 20 -22 to the SME box, and set up static routes to the same.

I understand that for ftp to work it requires the FTP server to contact the client, and as there is a NAT router - it cannot direct traffic back to the client. I also understand that this can be set up with some FTP servers in the 'ftpaccess' file - but cannot find one.

I have tried active and passive modes but no success.

Has anyone come accross this problem and have a solution? :-(

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
FTP server behind NAT router
« Reply #1 on: March 02, 2006, 03:30:24 PM »
Silly question, perhaps . .
. . you have of course configured your ftp-settings in the server-managers panel for remote access, haven't you ?
. . seeing that settings here override settings in individual i-bays.
Greetings
wyron
...

Offline Boris

  • *
  • 783
  • +0/-0
Re: FTP server behind NAT router
« Reply #2 on: March 02, 2006, 06:53:26 PM »
Quote from: "fosdyke"
I have forwarded ports 20 -22 to the SME box

You really need to forward TCP 21 and UDP 20 only for FTP. Note port 20 Is UDP, not TCP
...

Offline fosdyke

  • 13
  • +0/-0
FTP behind NAT router
« Reply #3 on: March 03, 2006, 11:17:55 AM »
Thanks for all your replies - but the problem does not appear to be a port forwarding one - ftp requests are getting to the server - but the replies are not being returned due to NAT on the router.

 :-? Geoff

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
FTP server behind NAT router
« Reply #4 on: March 03, 2006, 11:29:12 AM »
Well, I activate and deactivate NAT for FTP in my router (Draytek Vigor 2900 V) as a matter of routine.
The SME (6.5rc1 modified) has no problem with this at all.
I have to assume that your problems are related to the router, not the server.
This again assuming that your server is configured as a server/gateway, like mine.
Greetings
wyron
...

Offline fosdyke

  • 13
  • +0/-0
FTP behind NAT router
« Reply #5 on: March 03, 2006, 12:16:17 PM »
Hi thanks for the reply.

Can't disable NAT on router unless I get more IP addresses.

Config = server only - but I can't see how this would affect ftp if port 21 traffic is forwarded to the server's local IP address.

Any ideas?

Geoff