FTP access network to achieve within the computer and external network outside the network within the desktop of a remote network

   Based on previous two articles build ngrok realized within the network penetration, used the http and https protocols completed within the external network to access network sites, this one will teach you achieve outside the network within the desktop of a remote computer network using tcp agreement and external network access to internal network FTP.

Remote Desktop within a network, external network computer

  How to make a remote computer's local computer outside the network it performs network penetration with ngrok, the local remote port mapping out, and then use the Windows Remote Desktop, you can be connected.

  First, change ngrok.cfg file (of course you can use to re-build a (Techno ¯ ▽ ¯))

server_addr: "你的域名:4443"
trust_host_root_certs: false
tunnels:
  mstsc:
    remote_port: 5012
    proto:
      tcp: "127.0.0.1:3389"

  

  Then change start.bat file (the same way you can build a re-use (~ ¯ ▽ ¯) ~)

  ngrok -config=ngrok.cfg start mstsc

  

  And then run the file start.bat

   

  Then right computer → properties and click Remote settings.

  

  Cut to a remote option, check [Allow Remote Assistance connections to this computer], and then the following options should be allowed.

  

  Note: This machine need to set up the account password, not the computer account number and password can not be remotely connected.

  Then, we open the Windows built-in Remote Desktop on another computer.

  WIN + R operating mstsc.

   

  Or start menu search to find the remote desktop.

  

   Enter your domain name: port mapping server. Click on the link and then enter the remote computer's ID and password can be successfully connected.

  

Second, extranet access network FTP

  Operation carried out with ngrok network penetration, so that we can achieve external network access to local FTP implementation to the local file anytime, anywhere, is not very convenient.

  Here I did not use FTP on IIS, but with the Serv-U FTP server as the software.

  First, let's download and install Serv-U (download and install the Internet a lot, not repeat them here)

  After installation is enabled, creating a new domain, here I named ftp

   

  Then, click [user], add a domain user.

  

  Enter the user name and password, select the root directory.

  

  Then cut to [add] Directory Access Directory Access rule, select the path, click full access to save.

  

  Next, details click [domain], changing to the listener], click Add below.

  

  Pop-up window, and type the default IP address on the list, ftp port is connected to port 21 by default, I use 5001, then check the [Enable] monitors, fill in your domain name or server IP in the PASV mode.

  

  Then switch to the global, restrictions and click [Setup], [set to cut], in the following [Network Settings], set the PASV passive mode port range, I set here it is 5008-5009.

   

  Such FTP server build better, and in respect of port mapping with the ngrok. (Note: my local firewall was shut)

   

  Similarly, ngrok.cfg configuration file, set the TCP mapping, where all the used are written on the previous combination, this red box is used.

server_addr: "你的域名:4443"
trust_host_root_certs: false
tunnels:
  http:
    subdomain: "www"
    proto:
      http: "233"
  https:
    subdomain: "www"
    proto:
      https: "2333"
  mstsc:
    remote_port: 5002
    proto:
     tcp: "127.0.0.1:3389"
  ftp:
    remote_port: 5001
    proto:
     tcp: "127.0.0.1:5001"
  ftp1:
    remote_port: 5008
    proto:
     tcp: "127.0.0.1:5008"
  ftp2:
    remote_port: 5009
    proto:
     tcp: "127.0.0.1:5009"

  

  Then change start.bat file to start this use.

  ngrok -config=ngrok.cfg start ftp ftp1 ftp2

  

  

  So far, FTP server to get, and what we use it.

  Visit the website:

  Open your browser and enter ftp: // your domain name: ftp port, login pop-up login box.

  

  We can see the files in the FTP.

  

 

  Access the File Manager:

  Open Windows Explorer on another computer, enter ftp: // your domain name: ftp port.

  

  Then enter the user name and password for authentication.

  

  Successful visit.

  

  Access on your phone:

  ES download a file browser.

  

  Expand the right side, select FTP.

  

  Click New, select ftp.

  

  Configuration information, click OK.

  

  There will be a folder.

  

  After opening the can view and manipulate the files inside.

  

 

Guess you like

Origin www.cnblogs.com/LYF1997/p/11296158.html