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
1,570 views 0 comments
by

Hi to all forum users!
I have a little trouble with OpenVPN: I'm connecting several devices (Teltonika and not) using OpenVPN.
Here my settings for RUT955 client:

- Server IP: manually set for test purposes
- port: 1194 (default)
- protocol: TCP
- LZO: disabled
- mode: TUN
- encryption: AES-256/CBC-256
- authentication: TLS+password
- TLS cipher: all
- user: OVPN_Raspberry_test
- password: raspberry
- HMAC authentication algorithm: SHA1
- certificates:
ca.crt
client02_test.crt
client02_test.key


I need these settings for compatibility with other devices.

I installed OpenVPN on linux but I can't get connection to server (on router I can see client trying to acces but no VPN connection established).

May someone help me to write configuration file for client?
Thanks.
My file:

 

ca /etc/openvpn/ca.crt
cert /etc/openvpn/OVPN_Raspberry_tes.crt
key /etc/openvpn/OVPN_Raspberry_tes.key

persist-key
persist-tun
verb 3
auth-user-pass login.conf

remote-cert-tls server
#log-append /var/log/openvpn.log


is not working.
Here log:


pi@raspberrypi:/etc/openvpn/client $ sudo openvpn ./client.conf
Mon Jan 20 13:24:31 2020 WARNING: file 'login.conf' is group or others accessible
Mon Jan 20 13:24:31 2020 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Oct 14 2018
Mon Jan 20 13:24:31 2020 library versions: OpenSSL 1.0.2r  26 Feb 2019, LZO 2.08
Enter Private Key Password: **********
Mon Jan 20 13:24:34 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Jan 20 13:24:34 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]2.195.162.143:1194
Mon Jan 20 13:24:34 2020 Socket Buffers: R=[131072->131072] S=[16384->16384]
Mon Jan 20 13:24:34 2020 Attempting to establish TCP connection with [AF_INET]2.195.162.143:1194 [nonblock]
Mon Jan 20 13:24:35 2020 TCP connection established with [AF_INET]2.195.162.143:1194
Mon Jan 20 13:24:35 2020 TCP_CLIENT link local: (not bound)
Mon Jan 20 13:24:35 2020 TCP_CLIENT link remote: [AF_INET]2.195.162.143:1194
Mon Jan 20 13:24:46 2020 [UNDEF] Inactivity timeout (--ping-restart), restarting
Mon Jan 20 13:24:46 2020 SIGUSR1[soft,ping-restart] received, process restarting
Mon Jan 20 13:24:46 2020 Restart pause, 5 second(s)
Mon Jan 20 13:24:47 2020 SIGINT[hard,init_instance] received, process exiting

1 Answer

0 votes
by anonymous
Hello,

Did I understand correctly that a router is a server and Linux is a client? I tried to configure it and it works for me. How to configure more information can be found here:
https://wiki.teltonika.lt/view/OpenVPN_client_on_Linux

I would like you to note that when you create a Username & Password file, the username and password pair should be placed on a single line and separated by a space.