Jump to content

getting my head around a port forward...


loady

Recommended Posts

I have mostly bumbled my way around, slowly grasping things that i need to do to get what i want...with lots of help and reading. For the life of me i cant get my head around this port forward i need..i am probably over confusing myself so please some one explain to me in laymen terms.

 

I have just installed proftpd plugin on my UNraid, i have a router running DD-WRT, i have a  vip dyn account. Im aware proftpd uses port 21 and i DONT want to use that port to access the FTP..i read that forwarding to port 21 on server side is ok..but i cant get my head around how to do this, where am i selecting/entering the port i want to use to forward to port 21 ?? :o. For example..my dyn host name is mumma.dontexist.com which my dyn account forwards to my external ip address..i understand that...so to access my FTP on UNraid (UNraid is 192.168.1.122) i want to have ftp://mumma.dontexist.com:45678 and i want that to forward to proftpd on my unraid server...i have enable the DDNS on my router and put in my dyn account details (not sure i NEED to do that) but for the life of me i cant see where to put the :45678 port number to tell it thats the port i want forwarded to port 21 of proftpd.

 

Sorry if the above sound like jibberish..can you understand what i am trying to do ?

Link to comment

Here is the wiki for DDWRT port forwarding:  http://www.dd-wrt.com/wiki/index.php/Port_Forwarding 

 

So, what you want to do in you port forward rule for FTP is set "port from" to whatever port you want outside clients to use to access your FTP server (i.e. 45678).  Then you want to set "port to" to 21 (if that is what proftpd is setup to use).  "IP Address" should be set to the internal IP addy of your FTP server (i.e. 192.168.1.122).  "Protocol" you can just set to "both".

 

When an external client then connects to your ftp server @ port 45678 (i.e.  ftp://mumma.dontexist.com:45678), they will be redirected internally to the FTP server running on port 21 (i.e. 192.168.1.2:21).

 

FYI...I'm not sure if this is still the case but you used to have to also forward port 20.  If I remember correctly, port 20 was for control and port 21 was for data.

 

Hope this helps!

 

John

Link to comment

--- why does the wiki only talk about port range forwarding and nothing about simple port forwarding. ----

 

John

 

I have not used DDD-WRT in a while, bnstead of having multiple screens, you can use a range of 1 port, i.e port 21 to port 21.  From the wiki instructions "Enter the End port in the range you'd like to forward. If you're just forwarding 1 port, set them both equal."

Link to comment

None of the above work for me, except when i am within my own network using an ftp client i can connect on 192.168.1.122 port 54321 no problem..from outside i keep getting connection refused...this is what REALLY irritates me that i cant understand, i just keep getting 'Connection attempt failed with "ECONNREFUSED - Connection refused by server".'

 

I have tried disabling/enabling DDNS on my router, i tried reversing the to/from ports...no fekking dice man :( I HATE IP

Link to comment

None of the above work for me, except when i am within my own network using an ftp client i can connect on 192.168.1.122 port 54321 no problem..from outside i keep getting connection refused...this is what REALLY irritates me that i cant understand, i just keep getting 'Connection attempt failed with "ECONNREFUSED - Connection refused by server".'

 

I have tried disabling/enabling DDNS on my router, i tried reversing the to/from ports...no fekking dice man :( I HATE IP

 

Have you verified that DDNS is actually working?  Have you tried FTP'ing to you public IP instead to rule out DDNS.

 

Does this look like the correct IP?

 

Pinging mumma.dontexist.com [213.112.38.26] with 32 bytes of data:
Request timed out.
Request timed out.

 

John

Link to comment

mumma.dontexist.com was just an example...thats not actually my DNS, when i try to ping my public IP i get 'took to long to respond.it may be overloaded'

 

Also i have SABnzbd setup to access from outside my network and that works fine using DYN.com and relevant ports...not sure this to from port field is right ??.. sab is set to use 8081 and i have no problems accessing it using my hostname setup at DYN.com

Link to comment

Maybe I missed it in you posts above, but do you have FTP working correctly within you local network.  Can you access the FTP running the Unraid server from a PC within your network.  This is the very first step before you introduce NAT traversal into the configuration

 

I have not looked at the plugin so am not familiar with its config screen or the config script..  You might want to try and set it up for passive.

 

Have you looked at these pages.

 

http://www.proftpd.org/docs/howto/NAT.html

and

https://raw.github.com/SlrG/unRAIDplugins/master/proftpd/README.txt

 

I use the built-in FTP server within Unraid in order to use WinSCP to access the server when I need it.  While I have not used it for access from the outside world, there is no reason it should not work other than security concerns.

 

You may also want read these threads for using the built in server. 

 

http://lime-technology.com/forum/index.php?topic=20157.msg221929#msg221929

and

http://lime-technology.com/forum/index.php?topic=23652.msg208376#msg208376

 

 

These are the setting I run on boot up to get it to work.  You can modify the local_root=.*/local_root=\//' to  "/local_root=\/mnt/user for example to present on the user shares the starting point for FTP root access. 

 

# http://lime-technology.com/forum/index.php?topic=23652.msg208376#msg208376

# Allows SCP and FTP to work

#

# Fix vftpd conf file

echo "anon_world_readable_only=NO" >> /etc/vsftpd.conf

sed -i 's/.*local_root=.*/local_root=\//' /etc/vsftpd.conf

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...