FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
674 views 13 comments
by anonymous
Hi,

I would like to send a file from a location inside a rut955 to FTP server.

when the rut955 has no internet it will store the data in a file (in flash / small size) and when connection restored it will send it to FTP server, I managed to do the first part through script, But I don't know how to do the FTP part. I think the rut955 should be client to the FTP server, I tried to install the vsftpd but I didn't know how to use it or even run it even after seeing some manuals online, I don't even know if this is the right package to do what I need. I need some in details help or links if available

thanks,

2 Answers

0 votes
by anonymous
I am  using "wget POST" functionality on my large fleet of RUT955s to transfere files to a server. Although running "official openwrt", Teltonikas org stuff should allow this, too. You might consider installing the cert of your server, and then to post to https://myserver
by anonymous
thank you for your answer,

can you give an example of this "wget post" command because it seems like I am doing something wrong
by anonymous
You need the full-blown wget, not the crippled one, which might be default. So check for installation of "wget-ssl" package.

Typing wget --help should then show

...

--post-file=FILE    use POST method; send contents of file
by anonymous
thank you very much for your time but it is hard for me to get any support, still didn't know how to do it put I hope this information can help you helping me,

here is a photo of the command I use : https://ibb.co/q1wVkVK

here is a photo from winscp which can connect with no problems : https://ibb.co/gjLS526
by anonymous
Sorry, I never used the ftp stuff, only http(s).
0 votes
by anonymous

Hello,

 

The easiest way to achieve this is by utilizing the SFTP server integrated into RUT955 and accessing it from your server. This can be done by enabling remote SSH access (I strongly recommend using a non-standard port). This way you will be able to reach the RUT955 using its public IP address.

If a VPN connection is being utilized, then no configuration should be needed to access the SFTP server.

 

Best regards,
DaumantasG

by anonymous

can this work when the rut955 does not have public or static IP ? as it works on sim card 

If yes please explain more or If you have any useful links kindly share

also can I use curl command instead of wget because I don't know why it does not accept the SSLv3 although the wget support it. If you don't mind please check this photos I believe its a small issue but I don't know how to fix it

https://ibb.co/q1wVkVK
https://ibb.co/gjLS526

I don't have enough experience in this field

thanks

by anonymous

Hello,

  

Curl should also be possible to use. This site contains quite a bit of information about using Curl with SFTP.

As for reaching the device, multiple methods could be used here:

  • RMS (Remote Management System) is our platform for monitoring, managing, and reaching the devices, and third-party devices in the LAN/WAN networks of our devices. In your case, a VPN hub could be used to reach the device directly and extract the needed data. Most importantly, public IP is not needed on either end of the communication;
  • ZeroTier VPN could also be used, as it also does not require public IP on either end of the communication. 
Let me know if any more information is needed!

  

Best regards,
DaumantasG 

by anonymous
thanks,

we already using zeroteir for other application but for this one we need to write script that is why I use wget and curl,

here is my curl command which also not working and I don't know why, boring right !

curl  ftp://xxx.xxx.xxx.xxx -v -u xxx:xxx -k --insecure --ftp-ssl -3

(or with no -3 same result) (insecure option also doesn't make diff.)

here is a pic of the results https://ibb.co/yPVNnjR
by anonymous

As shown in the linked configuration example, the syntax is different for SFTP.

I tried it using this syntax and everything worked as expected:

The blurred area is the device password.

Let me know if it helps to use this command.

EDIT: this command was run on Ubuntu 20.04. As mentioned, I recommend downloading the file on the server, rather than uploading it from the router.

by anonymous

I think the problem is with the (TLS/SSL Explicit encryption) that we use , can you show me how to write it in the command line.

do you write configurations inside the "~/networkconfig" 

and I also get this error when I try the "sftp" option in the teltonika 

curl: (1) Protocol "sftp" not supported or disabled in libcurl
I couldn't solve this one either.

by anonymous

Are you running the latest firmware? It can be downloaded here.

The SFTP command needs to be run on the server, not the router. Nothing additional needs to be configured on the router, unless you are accessing the router from the WAN. 

by anonymous

ok I will try the firmware update,

let me explain this, we have FTP server that uses TLS/SSL Explicit encryption with a public IP and we can connect to it by winscp and filezilla from anywhere in the world with no farther requirements rather than the user, password and FTP TLS/SSL Explicit encryption option selected in winscp. now we want the rut955 to connect the same way.  the rut955 has sim card and it does not have any connection with the FTP server (remote location) 

in short, I want to do what the winscp application do but on the rut955 

by anonymous
Looks like the SSLv3 cipher is not included in Teltonikas standard libopenssl (or similar, like wolfssl) . Which is no wonder, because being considered insecure, out of favor for a while.  That is the bad news.

The good news is, you have a RUT955. Which runs "official openwrt" , giving you many more opportunities to customize your system, compared to Teltonikas stuff.

I am running a large fleet of RUT955, having custom openwrt firmware, with lot of custom code, for mqtt to AWS-IoT, remote firmware update OTA, remote access via VPN, data queuing, unattended remote configuration, ModBus/RTU to lower level sensors, auto-switchover between wan/wwan/wifi  etc. Only makes sense for a lot of devices, of course.
by anonymous
ok I am reading about this now, is it easy to do ore do you have a link to it ?

thanks for this information.