How to make the client.ovpn file?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Yashalta
OpenVpn Newbie
Posts: 1
Joined: Sun Jun 10, 2018 6:34 pm

How to make the client.ovpn file?

Post by Yashalta » Sun Jun 10, 2018 7:06 pm

Hi!
I have OpenVPN on the debian-server and Windows/Linux machines can easily connect to server without problems!
To me need also posibility to join android clients!
But, for connections from android need are client.ovpn file! What exactly client.ovpn must contain? And second question how to make the client.ovpn from what I have!
My server.conf

Code: Select all

dev tun
proto udp
port 1194

tls-server
server 10.11.0.0 255.255.255.0
comp-lzo

client-to-client
client-config-dir /etc/openvpn/ccd
ifconfig-pool-persist /etc/openvpn/ccd/ipp.txt   
dh /etc/openvpn/keys/dh1024.pem
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key

persist-tun
persist-key

tun-mtu 1500
tun-mtu-extra 32
mssfix 1450

push "ip route 10.11.0.0 255.255.255.0"

keepalive 10 120
ping-timer-rem
persist-tun
persist-key
user nobody
group users
daemon

log-append /var/log/openvpn/openvpn.log
status /var/log/openvpn/openvpn-status.log
verb 4
and my user.conf

Code: Select all

client
dev tun
proto udp  
remote XX.XX.XX.XX 1194  
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt       
cert user.crt   
key user.key  
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ping-restart 60    
ping 10
tls-auth ta.key 1
cipher AES-256-CBC
ns-cert-type server
comp-lzo
log user.log
verb 3
sndbuf 0
rcvbuf 0

bbuckm
OpenVPN User
Posts: 39
Joined: Thu Apr 26, 2018 2:45 pm

Re: How to make the client.ovpn file?

Post by bbuckm » Sun Jun 10, 2018 7:39 pm

It's easier to make the ovpn file on the server.

I haven't tried Android, but I did do iOS, and it's easier to embed the certificates rather than have separate files.

In other words, replace:

Code: Select all

ca ca.crt
with

Code: Select all

<ca>
-----BEGIN CERTIFICATE-----
MIIF...
-----END CERTIFICATE-----
</ca>
with corresponding changes elsewhere.

code322
OpenVpn Newbie
Posts: 1
Joined: Tue Mar 31, 2020 2:27 pm

Re: How to make the client.ovpn file?

Post by code322 » Tue Mar 31, 2020 2:29 pm

It is easier to make on the server and this script over on github makes it totally painless
https://github.com/Nyr/openvpn-install
It's called the Road Warrior for Debian, Ubuntu, CentOS

Post Reply