yet another blog about computer, technology, programming, and internet

Thursday, May 29, 2008

Setting up an FTP Server Behind NAT (Network Address Translation)

Thursday, May 29, 2008 Posted by Ismail Habib , 122 comments
Before starting, I assume that you have enough knowledge about FTP, active and passive mode in FTP, and NAT (Network Address Translation).

My home LAN (Local Area Connection) is consisted of several computers connected to The Internet via a router with a single IP Address, therefore obviously NAT is required. With NAT, there are two types of IP Address, local and global address(es). The computers in my network use local addresses which are only recognized inside my network. On the other hand, the router uses both address, so that it is possible to reach the router from local network or from the internet. I want to use one of my computer as an FTP server that can be accessed from outside my local network. The problem is that with only local address, the computer I used for FTP server couldn't be accessed from outside the local network.



In active mode, client is the one responsible in opening ports for data transmission. However, in passive mode (which is more popular), this responsibility is taken care by server. This is a similar problem from the previous one. The ports which are opened by the server are only available for those in the local network since it is using a local address.

Solution: Port Forwarding

In order to make the local FTP server available for anyone connected to the internet, a port forwarding must be applied to the router. For active mode, you just simply add port 21 (the default port for FTP) and forward it to the FTP server address. For passive mode, the same thing also have to be applied. In addition, several other ports are also need to be opened for data transmission.

Example:
I'm using the very common router (LinkSys WRT54GL) with local address 192.168.1.1. I want to open the port 21 and another ports from 60000-60050 for data transmission (this is actually up to you, pick anything above 1024). Open the router's interface from browser: http://192.168.1.1. Open the Application & Gaming -> Port Range Forward and fill in as follow (192.168.1.100 is my FTP Server's local address).



FTP Server Application

Another important thing that you need to do when using passive mode is setting up the FTP Server application itself. I think most of the FTP server application supports the usage of FTP server behind NAT. I'm going to use the free FileZilla FTP server as an example. In order to make the FTP Server works, you need to let it know about its global address. If you have a fixed address then you just have to tell the application about it, otherwise you will need another tool to retrieve the global address such as the one provided by FileZilla: http://ip.filezilla-project.org/ip.php.

To set up the FileZilla FTP server, open the Edit -> Settings menu and choose "Passive mode settings". If you have a fixed IP address (like in my example is 202.169.1.1), fill in the "Use the following IP" field, otherwise (or if you're not sure), just tick the "Retrieve external IP address from" and fill it with "http://ip.filezilla-project.org/ip.php". Tick both "Don't use external IP for local connections" and "Use custom port range". Fill the port range with the same range that you have filled in the router settings.

122 comments:

  1. I daily set an FTP server to reset switches 'cause I'm part of the IT team of the university but the thing is that I never hard about to set and FTP server behind nat thanks for posting this.

    ReplyDelete
  2. Perfect ideas for your story and great food for thought.

    ReplyDelete
  3. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.

    ReplyDelete
  4. Anonymous4:57 PM

    savior! thanks man! I applied this in linux firewall too and it works great!

    Thank you again!

    Recommend!

    ReplyDelete
  5. Anonymous4:54 PM

    Hey There. I found your blog using msn. This is an extremely well written article.
    I will be sure to bookmark it and come back to read more of your useful information. Thanks for the post.

    I will certainly return.

    Visit my web blog: anti malaria pills

    ReplyDelete
  6. Pick Qualified Packers and Movers Ghaziabad for Packing Moving

    Packers and Movers Delhi @ http://3th.co.in/packers-and-movers-delhi/
    Packers and Movers Faridabad @ http://3th.co.in/packers-and-movers-faridabad/
    Packers and Movers Ghaziabad @ http://3th.co.in/packers-and-movers-ghaziabad/
    Packers and Movers Noida @ http://3th.co.in/packers-and-movers-noida/

    ReplyDelete
  7. Exoprt Packers and Movers India are known to provide moving and packing services at the rates that actually fit in your budget and make you local shifting solutions experts for amazing rather than being filth only.
    Packers and Movers in Pune
    Packers and Movers in Mumbai
    Packers and Movers in Hyderabad
    Packers and Movers in Bangalore
    Packers and Movers in Chennai

    ReplyDelete
  8. How did you can avail the experts services of listed Adword India's No 1 companies?
    Thanks for information: http://www.adword.co.in/

    ReplyDelete
  9. Thanks for sharing such a informative article. I hope that this post is really useful for the people who looks for this. Also please check the below links:
    http://packersmoversahmedabad.co.in/
    We are expert in Handling, Movers Packers in Ahmedabad and Packing & Shifting of Household Goods, Office goods, Commercial Equipment and Car, Logistics and Transportation.

    ReplyDelete
  10. packers and movers pune, http://www.the5th.in/packers-and-movers-pune.html

    packers and movers mumbai, http://www.the5th.in/packers-and-movers-mumbai.html

    packers and movers bangalore, http://www.the5th.in/packers-and-movers-bangalore.html

    packers and movers gurgaon, http://www.the5th.in/packers-and-movers-gurgaon.html

    ReplyDelete
  11. Packers and Movers Bangalore amenable and kind administration individual take care of customer's enthusiasm for pressing and transporting and give them as per their bolster and hobby. This is for to meet their individual requests as every one have an alternate safe place. With the yearning to be "THE BEST" Packers Movers Bangalore productively constant frequently work to keep up the tag. What's more, henceforth ruling out grumblings.
    http://blog.packersmoversbangalore.in/
    http://packersmoversbangalore.in/packers-and-movers-vijayawada

    ReplyDelete
  12. Packers and Movers Delhi designate you a simple of covering the administrations like family/private moving, office exchanging, products moving , stacking and emptying, and so on most importantly if there should arise an occurrence of delay additionally we give you the office of warehousing your extensive measure of merchandise.
    http://blog.packers-and-movers-delhi.in/
    http://packers-and-movers-delhi.in/packers-and-movers-election-commission-delhi









    ReplyDelete
  13. Generally I don’t read article on blogs, but I would like to say that this write-up very compelled me to take
    a look at and do so! Your writing style has been amazed me.
    Thank you, very great post.
    Please visit our wonderful and valuable website-
    http://packersmoverschennai.in/
    http://packersmoverschennai.in/packers-and-movers-indian-institute-of-technology-chennai
    http://packersmoverschennai.in/packers-and-movers-krishnampet-chennai

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Packers and Movers Kolkata even say that we will go on your stock on time, however the capability for you to trust on us is you can check our customers diagram to affirm that different us from others. Movers And Packers Howarh say and furthermore appear and give you the best association. Every one of these parts of us make our affiliation the most solid and trust capable one among all. Close by these lines said, starting now and into the foreseeable future wards at whatever point you need pressing and moving relationship in an impeccable way you will get in touch with us with no faltering and will prescribe us to others we trust so from you.
    http://kolkatapackersmovers.in/
    http://kolkatapackersmovers.in/packers-and-movers-bhawanipore-kolkata
    Packers and Movers Kolkata

    ReplyDelete
  16. MOVERS AND PACKERS IN BANGALORE regard your sentiments and know the feelings of yours associated with the advantages thus to ensure the well-being and security of your associations is our uttermost need. Therefore we list only the skilled and sound departure workplaces with us. Our organizations are not compelled here just, we outfit you with the free question shape so you can get free relocation refers to from the top packers and movers of your city with a single structure. This is the thing that we and our working methodologies is about, your convenience and your satisfaction.
    http://packers-and-movers-bangalore.in/

    ReplyDelete
  17. Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.
    visit :Packers And Movers Hyderbad have earned our name and got so prominent simply in light of our persevering and commitment towards our work. Once on getting your enquiry we seek among the rundown of grouped that could address your issues most likely. - See more at: http://packersmovershyderabadcity.in/
    Packers And Movers Hyderabad

    ReplyDelete
  18. I really enjoyed reading your blog, you have lots of great content.Please visit here:
    http://jaipurpackersandmovers.in/
    http://jaipurpackersandmovers.in/packers-and-movers-alwar
    Support by a group of qualified member, well-mannered and careful employees, #PackersMoversJaipur Provide adapted best service for any type of Relocation like Office and Home Shifting whether it is local or domestic.

    ReplyDelete
  19. Get a wide range of packing and moving companies at helloenquiry.in. We endeavour to furnish the best packers and movers companies in Dehradun at ease of Internet. Packers and Movers Dehradun

    ReplyDelete
  20. Are you looking for best packers and movers? Give a call to us.We have an updated database of verified packers and movers companies in India.

    Packers Movers Bangalore

    Bangalore Packers and Movers

    Packers Movers Bangalore

    Ezmove Bangalore

    packers in Bangalore

    ReplyDelete
  21. Thanks for sharing useful information for us.I really enjoyed reading your blog, you have lots of great content.Please visit here:
    http://bhubaneswarpackersmovers.in/
    In loading and unloading is done carefully by experienced workers. In addition, #bhubaneswarpackersmovers unpacks the delivery at the target, very efficiently & with maximum care.

    ReplyDelete
  22. I really enjoyed reading your blog, you have lots of great content.Please visit here:
    http://packersmoversmumbaicity.in/
    Packers And Movers Mumbai based company provided that Movers And Packers Mumbai Services for Office, Home, Local or domestic and commercial purposes.

    ReplyDelete
  23. Packers And Movers Bhopal i must say you had done a tremendous job,I appreciate all your efforts.Thanks alot for your writings......Waiting for a new 1..
    http://packersmoversbhopal.in/packers-and-movers-indore

    ReplyDelete
  24. Nice post!..good information,it is really helpful..it really impressed me alot and i just loved it.Thanks for posting such an informative content:
    http://packers-and-movers-delhi.in/
    http://packers-and-movers-delhi.in/packers-and-movers-dwarka-delhi
    Packers and Movers Noida

    ReplyDelete
  25. Best packers and movers in Vadodara, household shifting service in Vadodara, home relocation in Vadodara, car carriers service in Vadodara, car transport in Vadodara. packers and movers Vadodara

    ReplyDelete
  26. A good informative post that you have shared and appreciate your work for sharing the information.....!! For Best Packing shifting companys visit here.... Packers And Movers Bangalore
    Packers And Movers horamavu
    Packers And Movers Hampinagar

    ReplyDelete
  27. Excellent post! I must thank you for this informative read. I hope you will post again soon. Warehousing of merchandise
    http://packersmoverschennai.in/packers-and-movers-virudhunagar-tamilnadu
    http://packersmoverschennai.in/packers-and-movers-nagapattinam-tamilnadu
    http://packersmoverschennai.in/packers-and-movers-ramanathapuram-tamilnadu
    packers movers chennai.in moving organizations and packers Neighborhood Chennai record likewise gives warehousing of items to a boundless timeframe.
    Packers And Movers Chennai

    ReplyDelete
  28. Any way I'll be subscribing to your feed and I hope you post again soon.
    Signature:
    i like play games happy wheels online and play happy wheels 2 games and friv , girlsgogames , games2girls

    ReplyDelete
  29. Packers and Movers Gurgaon - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon Charges - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon Rates - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon List - http://getpackers.com/packers-and-movers-gurgaon/
    Local Packers and Movers Gurgaon - http://getpackers.com/packers-and-movers-gurgaon/
    Movers and Packers Gurgaon - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers in Gurgaon - http://getpackers.com/packers-and-movers-gurgaon/
    Movers and Packers in Gurgaon - http://getpackers.com/packers-and-movers-gurgaon/
    Gurgaon Packers and Movers - http://getpackers.com/packers-and-movers-gurgaon/
    Gurgaon Movers and Packers - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Bangalore - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Pune - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Mumbai - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Hyderabad - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Kolkata - http://getpackers.com/packers-and-movers-gurgaon/
    Packers and Movers Gurgaon to Chennai - http://getpackers.com/packers-and-movers-gurgaon/

    ReplyDelete
  30. This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this.monkey go happy 2cat mario 2learn to fly 2 | happy wheels demo | mahjong online | pacman game | monkey go happy 3 | cat mario 3learn to fly 3 | happy wheels 2 | mahjong | pacman games

    ReplyDelete
  31. Oooh that is so cute. We like making paper boats and my four year old is dying to learn how to do it... I think soon he will be able to!
    Packers And Movers Pune
    Packers And Movers Pimpalgaon Joga Pune
    Packers And Movers Pimpalgaon Mahalunge Pune

    ReplyDelete
  32. Thanks for sharing this valuable information to our vision.
    Signature:
    Download retrica online includes more than eighty different filters with many different styles and include retrica indir , and happy wheels , agario

    ReplyDelete
  33. "Enjoyed every bit of your blog article.Really looking forward to read more. Really Cool."
    Packers And Movers Viramgam
    Packers And Movers Banaskantha
    Packers And Movers Dahod

    ReplyDelete
  34. Earn to Die 2 is a mobile game developed by Toffee Games. It is available on the App Store, Google Play and the Amazon Appstore Earn to Die | Earn to Die 3.
    Play the fabolous earn to die game and complete all the levels.You can play all the seven parts of the game on our website, including Tank trouble 2 is one of the best tank battle games and arcade games as a whole. If you love arcade games or want to play online against friends or family Tank trouble | Tank trouble 3 | Tank trouble 4

    ReplyDelete
  35. This is also a very good post which I really enjoyed reading. Please visit our website and play exciting games:
    Science Kombat | Science Kombat Game.
    Play the fabolous earn to die game and complete all the levels.You can play all the seven parts of the game on our website :
    Tank trouble | Tank trouble 2 | Tank trouble 3 | Tank trouble 4

    ReplyDelete
  36. This content is written very well. Your use of formatting when making your points makes your observations very clear and easy to understand. Thank you.
    - usps tracking
    - iphone 7 release date
    - excel

    ReplyDelete
  37. Thanks for giving me the useful information. I think I need it!
    Happy Wheels , FNAF World , Five Nights At Freddy's

    ReplyDelete
  38. We are giving you best shifting services in India and our services is very inexpensive. We have well skilled employees of packers and movers services. We also provide insurance of your goods.

    Packers and Movers in Mumbai
    Packers and Movers in Gurgaon

    ReplyDelete
  39. You article is describe in a good manners with best possible way and now I am follow your site on daily basis and I like a very much your blog, so keep posting with such a nice article and we are also write something about Indian festival if anyone interested them, so checkout link all

    Eid Mubarak Images
    Eid Mubarak 2016
    Friendship Day Images
    Happy Dussehra Images
    Happy Navratri Images
    Independence Day Images
    Raksha Bandhan Images
    Happy Diwali Images
    Happy Teachers Day Quotes Wishes
    Happy 4th of July Images Quotes
    Happy Fathers Day 2016
    Happy Fathers Day

    ReplyDelete
  40. We experience more than happy about that. You should also consider their finest game titles with our free currently to find the sense of exciting that brings.
    Temple Run 2
    Temple Run
    baixar Temple Run 2
    jogos Temple Run 2

    ReplyDelete
  41. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work : contact form | snapchat emoji

    ReplyDelete
  42. I was working and suddenly I visits your site frequently and recommended it to me to read also. Age Of War 2
    Big Farm | Slitherio
    Tank Trouble | Happy Wheels
    Goodgeme Empire | Slither.io

    ReplyDelete
  43. PSD to WordPress change is required to interface with a site to be executed on the structure. This change expects a key part in web change wind as the general execution and accomplishment of a page depends on upon it to an astounding degree. A faultless change allows the customers to switch subjects and expand the estimation of the site. At present times, customization has changed into a reality that runs well with the customer essentials. This change goes on a central measure of positive circumstances to give new statures to a site.

    PSD to WP Service
    PDF to WP Service
    PNG to WP Service
    JPG to WP Service

    ReplyDelete
  44. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    Discover our website bounty of free online games now!
    Our website has the biggest collection of free online games. Totally new games are added every day!

    age of war 2
    gold Miner 2
    unfair Mario 2
    cubefield 2
    tanki Online 2

    ReplyDelete
  45. great post. i like it. feeling great when reading your post. Keep on posting!
    baixar facebook
    whatsapp baixar
    temple run 2
    traffic rider

    ReplyDelete
  46. Thank you for visiting our site. Sure you will feel is amazing. Since we have been very selective as many games and you can play online for free
    gun mayhem 3 | tank trouble 3
    learn to fly 3 | happywheels
    tank trouble |

    ReplyDelete
  47. I never found any interesting article like yours. It is a wonderful value enough for me. In my view, if all web owners and bloggers made good content material as you did, it might be much more helpful than ever before
    Cara Mengobati Buah Zakar Besar Sebelah Pada Bayi
    Obat Dispepsia Yang Aman Untuk Ibu Hamil

    ReplyDelete
  48. I get back to the program by the love of people. That is quite a surprise and I feel happy. But I have not had much time to prepare the repertoire, dance and costumes as you for the finals.
    facebook baixar l baixar facebook gratis l baixar facebook l whatsapp baixar l baixar whatsapp gratis l baixar whatsapp

    ReplyDelete
  49. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    Discover our website bounty of free online games now!
    Our website has the biggest collection of free online games. Totally new games are added every day!

    age of war 2| gold Miner 2| unfair Mario 2 | cubefield 2 |tanki Online 2


    ReplyDelete