Menu

Command line parameter to transfer a file from A(behind NAT) to B(behind NAT)

Deb
2014-08-31
2014-09-01
  • Deb

    Deb - 2014-08-31

    Hi,

    Can you please help me with the command line parameters to transfer a file from A(behind NAT) to B(behind NAT)?

    Thanks
    Deb

     
  • Dennis Bush

    Dennis Bush - 2014-08-31

    If both endpoints are behind separate NATs, you would either need to set up port forwarding on the destination firewall or set up a server proxy on a third machine with a public IP.

    For port forwarding, the firewall should be configured to send any packets received on a particular port (for example, UDP 1044) to port 1044 on the destination machine. The method of doing so depends on the particular firewall.

    If you have a third machine with a public IP, you can start up a server proxy and set it up to wait for a connection from the receiver to poke a hole in the firewall. You'll need to create an RSA or ECDSA key for the receiver for this to work. The fingerprint of the receiver's key is then passed to the proxy as follows:

    ./uftpproxyd -s fp={receiver_fingerprint}

    The receiver must then be set up to send periodic heartbeat messages to the proxy:

    ./uftpd -k {encryption_key_file} -H {ip_of_proxy}

    Once both the receiver and the proxy are running, the proxy will get the heartbeat from the receiver and challenge the receiver to verify that it owns the key with the given fingerprint. The next heartbeat sent by the receiver will satisfy the challenge, and the proxy will then forward any incoming packets from a sender to the receiver.

    The sender can then send to the proxy's IP to send to the receiver:

    ./uftp -M {proxy_ip} {file_to_send}

     
  • Deb

    Deb - 2014-09-01

    Dennis,

    I am having trouble with uftpd command line, it says, "couldn't write to dest directory: No such file or directory".

    uftpd command line:
    uftpd.exe -k pvt1.ppk -H 10.12.12.10

    where pvt1.ppk is the file stored under the same directory as uftpd.exe.

    Also, let me know if the below command line format is correct.
    proxy command line:
    uftpproxyd.exe -s fp=16:9b:8e:1a:11:9a:01:c8:4a:d1:4b:ff:cc:95:8b:47

    Thanks
    Deb

     
  • Dennis Bush

    Dennis Bush - 2014-09-01

    The default destination directory for the client under windows is c:\temp. If that directory doesn't exist, you'll need to specify a different destination directory using the -D option.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.