indeed, I wish to use androidconnect to connect openvpn server.
Here is the functional configuration file I use in windows :
Client config
1
##############################################
2
3
# Sample client-side OpenVPN 2.0 config file #
4
5
# for connecting to multi-client server. #
6
7
# #
8
9
# This configuration can be used by multiple #
10
11
# clients, however each client should have #
12
13
# its own cert and key files. #
14
15
# #
16
17
# On Windows, you might want to rename this #
18
19
# file so it has a .ovpn extension #
20
21
##############################################
22
23
24
25
# Specify that we are a client and that we
26
27
# will be pulling certain config file directives
28
29
# from the server.
30
31
client
32
33
34
35
# Use the same setting as you are using on
36
37
# the server.
38
39
# On most systems, the VPN will not function
40
41
# unless you partially or fully disable
42
43
# the firewall for the TUN/TAP interface.
44
45
dev tap
46
47
# dev tun
48
49
50
51
# Windows needs the TAP-Win32 adapter name
52
53
# from the Network Connections panel
54
55
# if you have more than one. On XP SP2,
56
57
# you may need to disable the firewall
58
59
# for the TAP adapter.
60
61
;dev-node MyTap
62
63
64
65
# Are we connecting to a TCP or
66
67
# UDP server? Use the same setting as
68
69
# on the server.
70
71
;proto tcp
72
73
proto udp
74
75
76
77
# The hostname/IP and port of the server.
78
79
# You can have multiple remote entries
80
81
# to load balance between the servers.
82
83
remote xxxxxxxxxxxxxxx 1194
84
85
;remote my-server-2 1194
86
87
88
89
# Choose a random host from the remote
90
91
# list for load-balancing. Otherwise
92
93
# try hosts in the order specified.
94
95
;remote-random
96
97
98
99
# Keep trying indefinitely to resolve the
100
101
# host name of the OpenVPN server. Very useful
102
103
# on machines which are not permanently connected
104
105
# to the internet such as laptops.
106
107
resolv-retry infinite
108
109
110
111
# Most clients don't need to bind to
112
113
# a specific local port number.
114
115
nobind
116
117
118
119
# Downgrade privileges after initialization (non-Windows only)
120
121
;user nobody
122
123
;group nobody
124
125
126
127
# Try to preserve some state across restarts.
128
129
persist-key
130
131
persist-tun
132
133
134
135
# If you are connecting through an
136
137
# HTTP proxy to reach the actual OpenVPN
138
139
# server, put the proxy server/IP and
140
141
# port number here. See the man page
142
143
# if your proxy server requires
144
145
# authentication.
146
147
;http-proxy-retry # retry on connection failures
148
149
;http-proxy [proxy server] [proxy port #]
150
151
152
153
# Wireless networks often produce a lot
154
155
# of duplicate packets. Set this flag
156
157
# to silence duplicate packet warnings.
158
159
;mute-replay-warnings
160
161
162
163
# SSL/TLS parms.
164
165
# See the server config file for more
166
167
# description. It's best to use
168
169
# a separate .crt/.key file pair
170
171
# for each client. A single ca
172
173
# file can be used for all clients.
174
175
176
177
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
178
179
cert "C:\\Program Files\\OpenVPN\\config\\ClientVPN.crt"
180
181
key "C:\\Program Files\\OpenVPN\\config\\ClientVPN.key"
182
183
184
185
# Verify server certificate by checking that the
186
187
# certicate has the correct key usage set.
188
189
# This is an important precaution to protect against
190
191
# a potential attack discussed here:
192
194
195
#
196
197
# To use this feature, you will need to generate
198
199
# your server certificates with the keyUsage set to
200
201
# digitalSignature, keyEncipherment
202
203
# and the extendedKeyUsage to
204
205
# serverAuth
206
207
# EasyRSA can do this for you.
208
209
remote-cert-tls server
210
211
212
213
# If a tls-auth key is used on the server
214
215
# then every client must also have the key.
216
217
tls-auth ta.key 1
218
219
220
221
# Select a cryptographic cipher.
222
223
# If the cipher option is used on the server
224
225
# then you must also specify it here.
226
227
# Note that v2.4 client/server will automatically
228
229
# negotiate AES-256-GCM in TLS mode.
230
231
# See also the ncp-cipher option in the manpage
232
233
cipher AES-256-CBC
234
235
236
237
# Enable compression on the VPN link.
238
239
# Don't enable this unless it is also
240
241
# enabled in the server config file.
242
243
#comp-lzo
244
245
246
247
# Set log file verbosity.
248
249
verb 3
250
251
252
253
# Silence repeating messages
254
1
client
2
dev tap
3
proto udp
4
remote xxxxxxxxxxxxxxx 1194
5
resolv-retry infinite
6
nobind
7
persist-key
8
persist-tun
9
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
10
cert "C:\\Program Files\\OpenVPN\\config\\ClientVPN.crt"
11
key "C:\\Program Files\\OpenVPN\\config\\ClientVPN.key"
12
remote-cert-tls server
13
tls-auth ta.key 1
14
cipher AES-256-CBC
15
verb 3
Thanks for you help. please use simple words for my translator