FTP Server with UPnP Supported

Author
MeYaoZong
Advisor
LiDeChang
School
Jilin University
Major
Applied Computer Technology
Classification
TP393.093 File transfer program (FTP)
Degree
Master's thesis
Year
2006
Downloads
161
Citations
0

Request the full text

Abstract

In this article we design a FTP server with UPnP supported.It fixes the problem that FTP service would be un-available whenthe server is behind a NAT device.FTP service is a famous service on Internet. It makesdownloading and uploading files much easier than before. Lotsof companies setup FTP service to update clients’ software.In recent years, Internet grows rapidly. But IPv4 address islimited. There are only 32 bits binary in IPv4 address. So at mostwe could assign 232 IPv4 address. This is not enough at all. Forsome historical reason IPv4 address shortage is a big problem insome Asia countries.To fix this IPv4 address shortage problem, experts develop anew technology called Network Address Translation (NAT). WithNAT, hosts inside the network could use private IP address, suchas 172.16.0.0/16. On the Internet gateway router of this network,we could enable NAT to translate all private IP address to one orsome public Internet IPv4 addresses. In this way, we could share1 public Internet IPv4 address among hundreds of hosts. Itdramatically saves the IPv4 address resource.Another technology, IPv6 fix this problem completely byextent the IP address to 128 bits. That means we could assign IPaddresses up to 2128 hosts, almost every sands on the earthcould get an IP address. However it is a long-time job to deployIPv6 around the world. We need to update almost everything,including routers, operating systems and all applications. It willtake a long time to update these systems to support IPv6. So atpresent, NAT is the most popular solution for IPv4 addressshortage.However with the deployment of NAT, new problem comesout. Lots of applications and services assume that any hosts onInternet can communicate with them, if the connection socketsare listened successfully. But if there is a NAT device on theoutgoing port of the network, this suppose will not be correct. Asthe NAT device will refuse the connecting request which areinitialized from the Internet. To solve this issue, we could setupthe port-mapping on NAT device. By setup the port-mapping, wecould tell the NAT device in advance where the traffic should beforwarded when the connecting request arrived from Internet.But it could only suit the services which only use one single portto communicate, like SMTP/POP3/TELNET/SNMP/HTTP, etc.For FTP service, the service will not only listen 21 port for controlsession, but also other ports are needed for the data session.Although FTP server will active connect to the clients instead oflistening ports in PORT model, the connection could not beestablished successfully at most time. Because the NAT deviceon client sides will also refuse the connecting request from theserver. And the ports number for data sessions are randomlygenerated when the data connections are needed. So for FTPservice we could not setup the port-mapping first before theservice started, as we do not know which ports will be used fordata sessions. That’s why most FTP service in the privatenetwork will only be accessible in the inside network, butun-available for Internet.Now we are trying to fix this problem which is generated byusing NAT device.A new technology called Universal Plug and Play (UPnP)helps us. The UPnP architecture offers pervasive peer-to-peernetwork connectivity of PCs of all form factors, intelligentappliances, and wireless devices. The UPnP architecture is adistributed, open networking architecture that leverages TCP/IPand the Web to enable seamless proximity networking inaddition to control and data transfer among networked devices inthe home, office, and everywhere in between. By UPnP, wecould control NAT device in our program. We could addport-mapping when needed and delete it when we want. So wecould add the port-mapping on NAT device after FTP servicesuccessfully established its socket and delete it when FTPdestroyed the socket.To implement our design, we first need to register ourprogram as a control point. Then our program will receive thenotify message from the NAT device, which is multicast from239.255.255.250:1900. After getting the device self descriptiondocument which is in XML encapsulation, we could find out andsubscribe our interesting service. Now we could not only receivethe notify message, but also control the device by sending SOAPmessage. In this experiment only two kinds of messages areneed, one is add port-mapping message, and another is deleteport-mapping message. Also sometimes the port-mappingchecking message is need to make sure if the port-mappingentry has been added or deleted successfully.Until now, we could control the device by our own program,so next we should find when is the best time to add/deleteport-mapping on the device.By checking against the FTP RFC and sniffer most FTPclient softwares, we found, each time, when the FTP client needa passive (PASV) session, it would send ‘PASV’ command to theFTP server. When the FTP server receives ‘PASV’ command,first it will select a random port number, then make networksocket of this port and listen this socket. If the socket is listenedsuccessfully, FTP server will send the port number to client viacontrol session. So the best time we send add port-mappingmessage to the NAT device is after the socket is listenedsuccessfully. If the port-mapping entry for the port is setupsuccessfully, client from Internet will establish connections to ourinside FTP server successfully and transparently.Also we need to find a proper time to delete theport-mapping.In this experiment, we successfully make the FTP server inthe private network be accessible from Internet. Actually this is abetter solution in some companies. As our technology is themost cost-effective.

Table of contents

The first chapter 7-10 1.1 question 7 1.2 can be the solution and comparative analysis 7-9 1.3 of this study direction 9-10 Related Technical Overview 10-34 2.1 NAT 10-15 2.1.1 What is NAT 10-11 2.1.2 the routine NAT operation 11-15 2.2 UPnP 15-23 2.2.1 UPnP defines 16 2.2.2 UPnP duties 16-17 2.2.3 UPnP protocol collection 17-18 2.2.4 UPnP networking steps of 18-19 2.2.5 UPnP network components the 19-21 2.2.6 for the UPnP network media 21 2.2.7 UPnP protocol 21-23 2.3 NAT traversal 23-27 2.3.1 What is \; 24-25 2.3.3 how applications use NAT traversal the 25-26 2.3.4 NAT traversal limitations 2.4 the FTP 26-27 27-34 2.4.1 Active FTP is 28-29 2.4.2 passively, the FTP 29-34 Chapter III Design and Implementation 34-49 3.1 system architecture 34-35 3.2 design platform comparison and selection 35-39 3.2.1 Windows platform 35-37 3.2.1.1 UPnP 35 3.2.1.2 FTP 35-37 3.2.1.3 XML 37 3.2 .2 Linux platforms 37-38 3.2.2.1 UPnP 37-38 3.2.2.2 the FTP 38 3.2.2.3 XML nbsp ; 38 3.2.3 analysis 38-39 3.3 data structures 39-41 3.3.1 Internet Gateway Device (IGD) node 39-40 3.3.2 Internet Gateway Device 40-41 3.3.3 Serivce 41 3.4 UPnP operation 41-46 <br / the> 3.4.1 UPnP found 41-42 3.4.2 UPnP description 42 3.4.3 UPnP control 42-44 3.4.3.1 to increase port 42-44 3.4.3.2 delete port 44 3.4.4 UPnP event processing 44-46 3.5 embedded FTP service program 46-49 Chapter system testing and unresolved problems 49-56 4.1 test environment 49-51 4.2 test results 51-53 4.2.1 FlashFXP test results 51-52 4.2.2 the CuteFTP test results of 52-53 4.2.3 NAT device UPnP mapping table 53 4.2.4 The test results are summarized 53 4.3 outstanding 53-56 Chapter V Conclusions 56-57 Reference 57-59 summary for 59-62 ABSTRACT 62-65 Acknowledgements 65-66 mentor Introduction 66

Related dissertations

  1. The Design and Implementation of Dual Stack Lite Tunnel
  2. Multime Diadevices Interconnect Technology Research and Implementation Base on UPnP Protocol
  3. Research on Measuring Method of Adhesive Thickness of Solid Propellant Grain Surface by the Grating Projection
    ShiBingHua ·University of North ·2014 ·Master's thesis
  4. Design and Implementation of a Print Management Information System Based on Information Security
    WeiXiaoDong ·Xiamen University ·2013 ·Master's thesis
  5. Device Virtualization Technology Research and Its Application of the Internet of Things at Home
    ZhangHao ·Xiangtan University ·2013 ·Master's thesis
  6. Design of the Underwater Acoustic Network Communication Environment Software Simulation System
    ChengShuai ·Harbin Engineering University ·2013 ·Master's thesis
  7. The Design and Practice Research of Training Course's Learning Resource Based on Multimedia Learning Theory
    ChuWenJun ·Central China Normal University ·2014 ·Master's thesis
  8. A Research of Spread Setting in the408UL Seismic Instrument
    WangQingHua ·Yangtze University ·2013 ·Master's thesis
  9. The Application of EVA on the Performance Evaluation in CEB
    YangJianDong ·Ocean University of China ·2011 ·Master's thesis
  10. Interest Rate Risk Management Techniques of Commercial Banks-based on the Term Structure of Interest Rates
  11. Design and Implementation of Digital Home Remote Control System Based on Upnp
  12. Design and Implementation of Remote Control Software Based on Windo
    HuHaiBo ·Shandong University ·2012 ·Master's thesis
  13. Networked Smart Sensor Plug-and-Play Realization Mechanism and Method
  14. High Availability Campus Network Routing virtualization solution and Implementation Based on
    ZuoTianChao ·Fudan University ·2011 ·Master's thesis
  15. The Planning and Implementation of the Provincial Internet Network Construction
    MengHui ·Dalian University of Technology ·2013 ·Master's thesis
  16. Research on Radiant Virus Countermine Based on Computer Network
  17. Optimization Scheme of CGN Logs
  18. Design and Implementation of Proxy for Vulnerability Scanners Based on Cloud Computing
  19. The Research and Realization of Voluntary Defense System Based on Honeynet
    LiuXingXi ·Chongqing University ·2013 ·Master's thesis
  20. The Design and Accomplishment of the Test Tool for Packet-Filter Firewalls