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
663 views 8 comments
by anonymous

Hi

I'm trying to setup a RUT240 running RUT2XX_R_00.01.14.3 as an OpenVPN server to which I can connect using a Windows computer as client for instance. I've managed to create the certificates and setup the connection to work just fine using TLS as Authentication, but as soon as I change this to TLS/Password, add auth-user-pass to the client config, and upload either a file called openvpn or RUT240_username.txt containing the usernames and passwords (It doesn't say what file format it needs to be, or if the file has to have a specific name) then the connection to the RUT240 OpenVPN server fails with the following error message:

Thu Sep 02 09:23:05 2021 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)

Thu Sep 02 09:23:05 2021 TLS Error: TLS handshake failed

Thu Sep 02 09:23:05 2021 SIGUSR1[soft,tls-error] received, process restarting

Thu Sep 02 09:23:05 2021 MANAGEMENT: >STATE:1630567385,RECONNECTING,tls-error,,,,,

Thu Sep 02 09:23:05 2021 Restart pause, 10 second(s)

Thu Sep 02 09:23:16 2021 MANAGEMENT: >STATE:1630567396,RESOLVE,,,,,,

I'm lost, so hopefully one of you know what I'm missing or need to look for. smiley I tried searching this forum as well, but haven't found anything similar to my question, so I'm sorry if I missed it, and it has already been answered.

Thank you in advance


Stephen

by anonymous

I do have the same issue, only I use the latest FW release (RUT2_R_00.07.01), with this release the rut240 creates the certificates 

In the ovpn file I filled in the following:

ca   "ca.cert.pem"

cert "client.cert.pem"

key  "client.key"

I downloaded these files from the rut240 itself, so , they should be okay.

1 Answer

0 votes
by anonymous

Hello, 

Regarding the issue you are having I have tested it on my side and it is working fine. Could you try uploading this file to your OpenVPN config in RUT240 kindly don't change anything just leave this file as is and upload it then test if it works :) 

username: jerome password: 123123123

jerome.txt

Let me know the results

Regards,
Mellow

Best answer
by anonymous
Hello Mellow

Sorry, I thought I had already replied you. It was working perfectly with your file. I'm I saving the txt file in a wrong format or so, since mine doesn't work?

Regards,

Stephen
by anonymous

Hi, 

The issue mostly is when you are typing it in notepad it's having a different format. Notepad as default is using ANSI where the router is reading UTF-8. So it is best to create the password file via CLI with vi commands :) 

You can do so via executing this command in CLI: 

vi /root/password.txt
press [a] key on the keyboard to start editing then input:

jerome 123123123
Press [ESC] to exit editing mode and then type ":wq" to save. 

Now get the password file via WinSCP and you can use it in your further config 

Regards,
Mellow

by anonymous

Hi

I also tried using Notepad++, just to use a different one, but this didn't work either, even though it was set to UTF-8.

How do I get the file using WinSCP? Do I need to enable FTP on the router? [EDIT] figured it out using the information at this page: Upload & Download Files from RutOS - Teltonika Networks Wiki (teltonika-networks.com)

Regards,

Stephen

by anonymous
Hello,

Yes, that's correct :) You can just navigate to the folder and look for the password.txt file then copy and paste it to your desktop

Regards,
Mellow
by anonymous
Thank you for your help :-) It's working. Only problem now, it seems like I'm not allowed to use all sorts of special characters. Any ideas as to what is allowed what's not?
by anonymous

Hello, 

I have tested using !@#$%^&*() as a password and it works fine :) 

Just do the username password via routers CLI.

I hope it helps

Regards,
Mellow

by anonymous
Hi

Thank you for your help. I had an autogenerated password, and I think I removed this ~ character from the password to get it working :-)

Have a great day :-)

Regards,

Stephen