Changing the FTP port

Yannis

Member
Joined
Dec 18, 2007
Messages
7
Reaction score
0
Points
1
Age
66
My Satellite Setup
Hotbird (13E) - Dreambox DM-600PVR, DM-500+, WinXP.
My Location
Greece
I have 2 DMs.
In order to FTP them from outside the router, they must have different ports for FTP.
Is it possible to change port 21, being used by both? (DM-600 / DM-500+)
Thanks for any valuable advise.
Yannis
 

mhku

Super Moderator
Staff member
Joined
Mar 8, 2005
Messages
4,712
Reaction score
20
Points
38
My Satellite Setup
TM Nano ~ sg2100
My Location
Midlands
You can use port fowarding.

In your external FTP program, set the port to 22 for Dreambox A and 23 for Dreambox B (in the connection settings).

In your router, forward port 22 to Dreambox A IP address, private port 21; forward port 23 to Dreambox B IP address, private port 21.

See _http://portforward.com/ for more details.
 

Yannis

Member
Joined
Dec 18, 2007
Messages
7
Reaction score
0
Points
1
Age
66
My Satellite Setup
Hotbird (13E) - Dreambox DM-600PVR, DM-500+, WinXP.
My Location
Greece
mhku said:
You can use port fowarding.

In your external FTP program, set the port to 22 for Dreambox A and 23 for Dreambox B (in the connection settings).

In your router, forward port 22 to Dreambox A IP address, private port 21; forward port 23 to Dreambox B IP address, private port 21.

See _http://portforward.com/ for more details.

Thanks for the post.
I'm afraid this is not the case with DG834G of Netgear. On this router there's no option to set a "private port xx". Therefore, the port set in the FTP program, must match the inside port. It only routes the request to the correct inside IP.
Or I forget something?
thanks again
 

mhku

Super Moderator
Staff member
Joined
Mar 8, 2005
Messages
4,712
Reaction score
20
Points
38
My Satellite Setup
TM Nano ~ sg2100
My Location
Midlands
That's a pain. The only other option is to change the FTP port that one of the Dreamboxes uses to listen on.

Not sure how; I'll have a look.
 

mhku

Super Moderator
Staff member
Joined
Mar 8, 2005
Messages
4,712
Reaction score
20
Points
38
My Satellite Setup
TM Nano ~ sg2100
My Location
Midlands
Killed my FTP service... mending in progress :(

Looks like you'll need TuxBox Commander (a plugin) and the edit /etc/vsftpd.conf

and a line something like

LISTEN_PORT = 201

where 201 = the port that it will listen on.

I can't test it as I'm still trying it.
 

mhku

Super Moderator
Staff member
Joined
Mar 8, 2005
Messages
4,712
Reaction score
20
Points
38
My Satellite Setup
TM Nano ~ sg2100
My Location
Midlands
You do any of the following at your own risk.

I haven't tried this as Tuxbox Commander crops the left hand side of my screen but here you go.

Edit the two files as shown below (using port 2021 as the an example of the new FTP port on the Dreambox):

1) Edit /etc/services

ftp 2021/tcp


2) Edit /etc/vsftpd.conf adding:

listen_port= 2021
pasv_address= public IP
pasv_min_port=20000
pasv_max_port=20100


3.- Open ports 20000 - 20100 in the router

Set the FTP Client to Passive Mode and set the port to 2021 that it uses for the Dreambox connection.

After editing the files restart the ftp daemon from a telnet session using

/etc/init.d/vsftpd restart

BACKUP both files before editing. Screw them up and you'll need to telnet it to the box, delete the files and rename the backups to the original file names.

You can use either vi (using a telnet session) or TuxBox Commander on the Dreambox (it's a plugin). You can also use a UNIX compatible file editor on your PC to edit the files. Do NOT use an editor that doesn't support UNIX compatibility.

Do it carefully as I messed up my vsftpd.conf and had to edit every line using TuxBox and vi did my head it.

Good Luck!

p.s. a router that supports public and private ports is an easier option.
 

Yannis

Member
Joined
Dec 18, 2007
Messages
7
Reaction score
0
Points
1
Age
66
My Satellite Setup
Hotbird (13E) - Dreambox DM-600PVR, DM-500+, WinXP.
My Location
Greece
Thank you and, I understand I put you in trouble!
Appreciate.
As you say, the best approach is through a new router - and you are wright.
thanks again
 

mhku

Super Moderator
Staff member
Joined
Mar 8, 2005
Messages
4,712
Reaction score
20
Points
38
My Satellite Setup
TM Nano ~ sg2100
My Location
Midlands
If you accept the risks then it will work :)
 
Top