Page 1 of 2

Help with FTP Server...

Posted: Tue Jun 09, 2015 10:43 pm
by tops
Hello guys, okay?

This is my first post, although follow and use the Gargoyle has long since (over 5 years, but always as a basic user).

Now, the need arose to be creating an FTP server to share some work files with my friends ... I'm using version 1.6.2 ...

Okay, I have a TP-Link TL-WR1043ND router and also have a connection with optic fiber with 100 megabits to download and 50 megabits to upload, and the FTP will be used occasionally and with small files, so will not affect my internet .

The problem is that my ISP blocks port 21 (default port for FTP) and then need to set up another door, example 2121. But how I am newbie in this type of configuration, do not know where to do it and I came here to ask for your help .

Inform that performing tests on my local network, the FTP server is running fine.

So I need to change the default port to access the WAN to the door in 2121 and most likely, change the firewall settings to allow access to my FTP server.

Can anyone help me? Sorry for my english and receive hugs from Brazilian friends !!

Re: Help with FTP Server...

Posted: Tue Jun 09, 2015 11:15 pm
by nworbnhoj
I have not attempted this arrangement but I suspect that you could use:

Gargoyle - Firewall - Port Forwarding - Individual Port Forwarding

to forward port 2121 to 192.168.1.1 port 25
OR to forward port 2121 to 127.0.0.1 port 25

I also think that you should be careful at least to have strong passwords on your Gargoyle FTP accounts setup at:

Gargoyle - System - USB Storage - Shared Disks

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 7:56 am
by tops
nworbnhoj wrote:I have not attempted this arrangement but I suspect that you could use:

Gargoyle - Firewall - Port Forwarding - Individual Port Forwarding

to forward port 2121 to 192.168.1.1 port 25
OR to forward port 2121 to 127.0.0.1 port 25

I also think that you should be careful at least to have strong passwords on your Gargoyle FTP accounts setup at:

Gargoyle - System - USB Storage - Shared Disks
Hello friend nworbnhoj, thanks for your help ...

I did the Port Forward setting you suggested, but it did work. I think it would work well if I were running the FTP server on my computer, on my internal network, but to make clear to you and to other friends that I'm running the FTP server in the router itself!

I believe that somewhere inside the router, there must be a .conf file where you change all the FTP server settings. Did you know tell me the path of that file? I will try to access via shh (putty) and then edit the file with the VI.

Do more, thank you for hours and my FTP accounts are protected with strong passwords yes!

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 8:12 am
by nworbnhoj
tops wrote:I'm running the FTP server in the router itself
Yes I had assumed that you were running the Gargoyle FTP server and that the LAN IP address of your Gargoyle router is 192.168.1.1. Hence I suggested
nworbnhoj wrote:to forward port 2121 to 192.168.1.1 port 25
OR to forward port 2121 to 127.0.0.1 port 25
ie to forward external Gargoyle port 2121 to the internal IP address or loopback address of your Gargoyle router.

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 8:52 am
by tops
nworbnhoj wrote:
tops wrote:I'm running the FTP server in the router itself
Yes I had assumed that you were running the Gargoyle FTP server and that the LAN IP address of your Gargoyle router is 192.168.1.1. Hence I suggested
nworbnhoj wrote:to forward port 2121 to 192.168.1.1 port 25
OR to forward port 2121 to 127.0.0.1 port 25
ie to forward external Gargoyle port 2121 to the internal IP address or loopback address of your Gargoyle router.
I´ll try and report here!!!
Thanks!!

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 12:19 pm
by tops
It did not work :(

There must be some conf file somewhere where you can edit and make FTP work properly ... Searching the Internet and forum ...

:oops: :cry:

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 6:51 pm
by nworbnhoj
duh! :oops:

You could always try ....

Gargoyle - System - USB Storage - Shared Disks - Allow Access to FTP from WAN

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 6:58 pm
by tops
nworbnhoj wrote:duh! :oops:

You could always try ....

Gargoyle - System - USB Storage - Shared Disks - Allow Access to FTP from WAN
Ok... I setting this option, but the problem is that my ISP Block the default port of ftp service (21)... And I wanna change de default port (21) tô 2121...

Understand?

Thanks again

Re: Help with FTP Server...

Posted: Wed Jun 10, 2015 7:26 pm
by nworbnhoj
oops (again) sorry I forgot the port 2121 bit.

Again I have not tried this configuration (obviously) but I suspect that logging into Gargoyle using ssh and then editing /etc/vsftpd.com.template followed by "service vsftpd restart" might be helpful (especially the line "listen_port=21").

Might be worth reading https://help.ubuntu.com/community/vsftpd

Re: Help with FTP Server...

Posted: Fri Jul 10, 2015 6:26 pm
by DrData
Login into your router by ssh

cd ..
cd etc
cd init.d

edit the File vsftpd , for example with nano

nano vsftpd

search for this line:
echo "anonymous_enable=no" >> "$vsftpd_conf"


after this line add a new line:

echo "listen_port=2121" >> "$vsftpd_conf"


save the file and restart your router.

After this vsftpd is listen on Port 2121.
I have only tested in local Network.
I dont know if it works from the WAN side.
If not you have to edit your Firewall.


If you dont have nano installed, install it like:

opkg update
opkg install nano



Please let me know if it works from the WAN side.