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
6,960 views 2 comments
by anonymous

I have spend hours trying to get openvpn to work on my RUT950 and to let a remote windows pc and iPhone connect to it but i cant get it working.

Setup OPENVPN Server on RUT950

Created TLS certifcates
https://wiki.teltonika.lt/view/How_to_generate_TLS_certificates_(Windows)%3F

uploaded certs to the RUT 950 OpenVPN server settings
ca.cert
server.cert
server.key
dh2048.pem


Created a OpenVPN  openvpn.ovpn File like this

https://wiki.teltonika.lt/view/OpenVPN_client_on_Windows

client
dev tun_c_ovpn
proto udp
remote mydomain.ddns.com 1194
resolv-retry infinite
keepalive 5 10
nobind
persist-key
persist-tun
verb 3
<ca>
-----BEGIN CERTIFICATE-----
Copied ca.cert data
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
server.cert data
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----
server.key data
-----END PRIVATE KEY-----
</key>

Imported the openvpn.ovpn with openvpn on my windows 10 machine but its not connecting 

Sun Jan 05 13:41:27 2020 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Sun Jan 05 13:41:27 2020 Need hold release from management interface, waiting...
Sun Jan 05 13:41:28 2020 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'state on'
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'log all on'
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'echo all on'
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'bytecount 5'
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'hold off'
Sun Jan 05 13:41:28 2020 MANAGEMENT: CMD 'hold release'
Sun Jan 05 13:41:28 2020 MANAGEMENT: >STATE:1578228088,RESOLVE,,,,,,
Sun Jan 05 13:41:28 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]91.141.144.80:1194
Sun Jan 05 13:41:28 2020 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Jan 05 13:41:28 2020 UDP link local: (not bound)
Sun Jan 05 13:41:28 2020 UDP link remote: [AF_INET]91.141.144.80:1194
Sun Jan 05 13:41:28 2020 MANAGEMENT: >STATE:1578228088,WAIT,,,,,,
Sun Jan 05 13:41:38 2020 [UNDEF] Inactivity timeout (--ping-restart), restarting
Sun Jan 05 13:41:38 2020 SIGUSR1[soft,ping-restart] received, process restarting
Sun Jan 05 13:41:38 2020 MANAGEMENT: >STATE:1578228098,RECONNECTING,ping-restart,,,,,
Sun Jan 05 13:41:38 2020 Restart pause, 5 second(s)

Could someone please help and tel me what i am doing wrong, its driving me crazy.

1 Answer

0 votes
by anonymous

Hello,

There are some things missing in yours configuration. You should enter Virtual network IP address and netmask in yours server setup.

Yours Win10 client config file is missing line 'comp-lzo' it will use LZO compression that you are using in server side, so just add it at the end, before certificates.

Then for client side you have to use client certificate and key files, not server. If that does not help try making new certificates.

Finally, is there a reason why you are keeping client side keepalive values so low? It might keep restarting your VPN every 10 seconds if before it even has a chance to establish connection (it would be best to use same values at both, server and client sides)

VidasKac.

by

Thank you its working now.

One problem i have a dynamic ip so i thought i could use the host name in de client config like this 

remote domain.dyndnss.net 1194

but that doenst work, it only works if i use the IP, is there a fix for this or have i just ruiend 2 days of my life for something i finally got working with you're help, to find it its useless for me :)

by anonymous
Hello, I just checked this kind of configuration and it connected from Win10 client to RUT950 server behind DDnS, so It definitely should work for you too. Could you post what kind of error you are getting now? And was yours router WebUI reachable through DDnS at the time when you tried to set up Open VPN tunnel?