forked from OpenVPN/openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenvpn.8
6701 lines (6148 loc) · 204 KB
/
openvpn.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" OpenVPN -- An application to securely tunnel IP networks
.\" over a single TCP/UDP port, with support for SSL/TLS-based
.\" session authentication and key exchange,
.\" packet encryption, packet authentication, and
.\" packet compression.
.\"
.\" Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License version 2
.\" as published by the Free Software Foundation.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program (see the file COPYING included with this
.\" distribution); if not, write to the Free Software Foundation, Inc.,
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.\"
.\" Manual page for openvpn
.\
.\" SH section heading
.\" SS subsection heading
.\" LP paragraph
.\" IP indented paragraph
.\" TP hanging label
.\
.\" .nf -- no formatting
.\" .fi -- resume formatting
.\" .ft 3 -- boldface
.\" .ft -- normal face
.\" .in +|-{n} -- indent
.\"
.TH openvpn 8 "17 November 2008"
.\"*********************************************************
.SH NAME
openvpn \- secure IP tunnel daemon.
.\"*********************************************************
.SH SYNOPSIS
.ft 3
openvpn [ options ... ]
.ft
.\"*********************************************************
.SH INTRODUCTION
.LP
OpenVPN is an open source VPN daemon by James Yonan.
Because OpenVPN tries to
be a universal VPN tool offering a great deal of flexibility,
there are a lot of options on this manual page.
If you're new to OpenVPN, you might want to skip ahead to the
examples section where you will see how to construct simple
VPNs on the command line without even needing a configuration file.
Also note that there's more documentation and examples on
the OpenVPN web site:
.I http://openvpn.net/
And if you would like to see a shorter version of this manual,
see the openvpn usage message which can be obtained by
running
.B openvpn
without any parameters.
.\"*********************************************************
.SH DESCRIPTION
.LP
OpenVPN is a robust and highly flexible VPN daemon.
OpenVPN supports SSL/TLS security, ethernet bridging,
TCP or UDP tunnel transport through proxies or NAT,
support for dynamic IP addresses and DHCP,
scalability to hundreds or thousands of users,
and portability to most major OS platforms.
OpenVPN is tightly bound to the OpenSSL library, and derives much
of its crypto capabilities from it.
OpenVPN supports
conventional encryption
using a pre-shared secret key
.B (Static Key mode)
or
public key security
.B (SSL/TLS mode)
using client & server certificates.
OpenVPN also
supports non-encrypted TCP/UDP tunnels.
OpenVPN is designed to work with the
.B TUN/TAP
virtual networking interface that exists on most platforms.
Overall, OpenVPN aims to offer many of the key features of IPSec but
with a relatively lightweight footprint.
.\"*********************************************************
.SH OPTIONS
OpenVPN allows any option to be placed either on the command line
or in a configuration file. Though all command line options are preceded
by a double-leading-dash ("\-\-"), this prefix can be removed when
an option is placed in a configuration file.
.\"*********************************************************
.TP
.B \-\-help
Show options.
.\"*********************************************************
.TP
.B \-\-config file
Load additional config options from
.B file
where each line corresponds to one command line option,
but with the leading '\-\-' removed.
If
.B \-\-config file
is the only option to the openvpn command,
the
.B \-\-config
can be removed, and the command can be given as
.B openvpn file
Note that
configuration files can be nested to a reasonable depth.
Double quotation or single quotation characters ("", '')
can be used to enclose single parameters containing whitespace,
and "#" or ";" characters in the first column
can be used to denote comments.
Note that OpenVPN 2.0 and higher performs backslash-based shell
escaping for characters not in single quotations,
so the following mappings should be observed:
.nf
.ft 3
.in +4
\\\\ Maps to a single backslash character (\\).
\\" Pass a literal doublequote character ("), don't
interpret it as enclosing a parameter.
\\[SPACE] Pass a literal space or tab character, don't
interpret it as a parameter delimiter.
.in -4
.ft
.fi
For example on Windows, use double backslashes to
represent pathnames:
.nf
.ft 3
.in +4
secret "c:\\\\OpenVPN\\\\secret.key"
.in -4
.ft
.fi
For examples of configuration files,
see
.I http://openvpn.net/examples.html
Here is an example configuration file:
.nf
.ft 3
.in +4
#
# Sample OpenVPN configuration file for
# using a pre-shared static key.
#
# '#' or ';' may be used to delimit comments.
# Use a dynamic tun device.
dev tun
# Our remote peer
remote mypeer.mydomain
# 10.1.0.1 is our local VPN endpoint
# 10.1.0.2 is our remote VPN endpoint
ifconfig 10.1.0.1 10.1.0.2
# Our pre-shared static key
secret static.key
.in -4
.ft
.fi
.\"*********************************************************
.SS Tunnel Options:
.TP
.B \-\-mode m
Set OpenVPN major mode. By default, OpenVPN runs in
point-to-point mode ("p2p"). OpenVPN 2.0 introduces
a new mode ("server") which implements a multi-client
server capability.
.\"*********************************************************
.TP
.B \-\-local host
Local host name or IP address for bind.
If specified, OpenVPN will bind to this address only.
If unspecified, OpenVPN will bind to all interfaces.
.\"*********************************************************
.TP
.B \-\-remote host [port] [proto]
Remote host name or IP address. On the client, multiple
.B \-\-remote
options may be specified for redundancy, each referring
to a different OpenVPN server. Specifying multiple
.B \-\-remote
options for this purpose is a special case of the more
general connection-profile feature. See the
.B <connection>
documentation below.
The OpenVPN client will try to connect to a server at
.B host:port
in the order specified by the list of
.B \-\-remote
options.
.B proto
indicates the protocol to use when connecting with the
remote, and may be "tcp" or "udp".
For forcing IPv4 or IPv6 connection suffix tcp or udp
with 4/6 like udp4/udp6/tcp4/tcp6.
The client will move on to the next host in the list,
in the event of connection failure.
Note that at any given time, the OpenVPN client
will at most be connected to
one server.
Note that since UDP is connectionless, connection failure
is defined by the
.B \-\-ping
and
.B \-\-ping-restart
options.
Note the following corner case: If you use multiple
.B \-\-remote
options, AND you are dropping root privileges on
the client with
.B \-\-user
and/or
.B \-\-group,
AND the client is running a non-Windows OS, if the client needs
to switch to a different server, and that server pushes
back different TUN/TAP or route settings, the client may lack
the necessary privileges to close and reopen the TUN/TAP interface.
This could cause the client to exit with a fatal error.
If
.B \-\-remote
is unspecified, OpenVPN will listen
for packets from any IP address, but will not act on those packets unless
they pass all authentication tests. This requirement for authentication
is binding on all potential peers, even those from known and supposedly
trusted IP addresses (it is very easy to forge a source IP address on
a UDP packet).
When used in TCP mode,
.B \-\-remote
will act as a filter, rejecting connections from any host which does
not match
.B host.
If
.B host
is a DNS name which resolves to multiple IP addresses,
one will be randomly
chosen, providing a sort of basic load-balancing and
failover capability.
.\"*********************************************************
.TP
.B \-\-remote-random-hostname
Prepend a random string (6 bytes, 12 hex characters) to hostname to prevent
DNS caching. For example, "foo.bar.gov" would be modified to
"<random-chars>.foo.bar.gov".
.\"*********************************************************
.TP
.B <connection>
Define a client connection
profile. Client connection profiles are groups of OpenVPN options that
describe how to connect to a given OpenVPN server. Client connection
profiles are specified within an OpenVPN configuration file, and
each profile is bracketed by
.B <connection>
and
.B </connection>.
An OpenVPN client will try each connection profile sequentially
until it achieves a successful connection.
.B \-\-remote-random
can be used to initially "scramble" the connection
list.
Here is an example of connection profile usage:
.nf
.ft 3
.in +4
client
dev tun
<connection>
remote 198.19.34.56 1194 udp
</connection>
<connection>
remote 198.19.34.56 443 tcp
</connection>
<connection>
remote 198.19.34.56 443 tcp
http-proxy 192.168.0.8 8080
http-proxy-retry
</connection>
<connection>
remote 198.19.36.99 443 tcp
http-proxy 192.168.0.8 8080
http-proxy-retry
</connection>
persist-key
persist-tun
pkcs12 client.p12
ns-cert-type server
verb 3
.in -4
.ft
.fi
First we try to connect to a server at 198.19.34.56:1194 using UDP.
If that fails, we then try to connect to 198.19.34.56:443 using TCP.
If that also fails, then try connecting through an HTTP proxy at
192.168.0.8:8080 to 198.19.34.56:443 using TCP. Finally, try to
connect through the same proxy to a server at 198.19.36.99:443
using TCP.
The following OpenVPN options may be used inside of
a
.B <connection>
block:
.B bind,
.B connect-retry,
.B connect-retry-max,
.B connect-timeout,
.B explicit-exit-notify,
.B float,
.B fragment,
.B http-proxy,
.B http-proxy-option,
.B http-proxy-retry,
.B http-proxy-timeout,
.B link-mtu,
.B local,
.B lport,
.B mssfix,
.B mtu-disc,
.B nobind,
.B port,
.B proto,
.B remote,
.B rport,
.B socks-proxy,
.B socks-proxy-retry,
.B tun-mtu and
.B tun-mtu-extra.
A defaulting mechanism exists for specifying options to apply to
all
.B <connection>
profiles. If any of the above options (with the exception of
.B remote
) appear outside of a
.B <connection>
block, but in a configuration file which has one or more
.B <connection>
blocks, the option setting will be used as a default for
.B <connection>
blocks which follow it in the configuration file.
For example, suppose the
.B nobind
option were placed in the sample configuration file above, near
the top of the file, before the first
.B <connection>
block. The effect would be as if
.B nobind
were declared in all
.B <connection>
blocks below it.
.\"*********************************************************
.TP
.B \-\-proto-force p
When iterating through connection profiles,
only consider profiles using protocol
.B p
('tcp'|'udp').
.\"*********************************************************
.TP
.B \-\-remote-random
When multiple
.B \-\-remote
address/ports are specified, or if connection profiles are being
used, initially randomize the order of the list
as a kind of basic load-balancing measure.
.\"*********************************************************
.TP
.B \-\-proto p
Use protocol
.B p
for communicating with remote host.
.B p
can be
.B udp,
.B tcp-client,
or
.B tcp-server.
The default protocol is
.B udp
when
.B \-\-proto
is not specified.
For UDP operation,
.B \-\-proto udp
should be specified on both peers.
For TCP operation, one peer must use
.B \-\-proto tcp-server
and the other must use
.B \-\-proto tcp-client.
A peer started with
.B tcp-server
will wait indefinitely for an incoming connection. A peer
started with
.B tcp-client
will attempt to connect, and if that fails, will sleep for 5
seconds (adjustable via the
.B \-\-connect-retry
option) and try again infinite or up to N retries (adjustable via the
.B \-\-connect-retry-max
option). Both TCP client and server will simulate
a SIGUSR1 restart signal if either side resets the connection.
OpenVPN is designed to operate optimally over UDP, but TCP capability is provided
for situations where UDP cannot be used.
In comparison with UDP, TCP will usually be
somewhat less efficient and less robust when used over unreliable or congested
networks.
This article outlines some of problems with tunneling IP over TCP:
.I http://sites.inka.de/sites/bigred/devel/tcp-tcp.html
There are certain cases, however, where using TCP may be advantageous from
a security and robustness perspective, such as tunneling non-IP or
application-level UDP protocols, or tunneling protocols which don't
possess a built-in reliability layer.
.\"*********************************************************
.TP
.B \-\-connect-retry n
Wait
.B n
seconds between connection attempts (default=5).
.\"*********************************************************
.TP
.B \-\-connect-timeout n
For
.B \-\-proto tcp-client,
set connection timeout to
.B n
seconds (default=10).
.\"*********************************************************
.TP
.B \-\-connect-retry-max n
.B n
specifies the number of times all
.B \-\-remote
respectively
.B <connection>
statements are tried. Specifiying
.B n
as one would try each entry exactly once. A sucessful connection
resets the counter. (default=umlimited).
.\"*********************************************************
.TP
.B \-\-show-proxy-settings
Show sensed HTTP or SOCKS proxy settings. Currently, only Windows clients
support this option.
.\"*********************************************************
.TP
.B \-\-http-proxy server port [authfile|'auto'|'auto-nct'] [auth-method]
Connect to remote host through an HTTP proxy at address
.B server
and port
.B port.
If HTTP Proxy-Authenticate is required,
.B authfile
is a file containing a username and password on 2 lines, or
"stdin" to prompt from console.
.B auth-method
should be one of "none", "basic", or "ntlm".
HTTP Digest authentication is supported as well, but only via
the
.B auto
or
.B auto-nct
flags (below).
The
.B auto
flag causes OpenVPN to automatically determine the
.B auth-method
and query stdin or the management interface for
username/password credentials, if required. This flag
exists on OpenVPN 2.1 or higher.
The
.B auto-nct
flag (no clear-text auth) instructs OpenVPN to automatically
determine the authentication method, but to reject weak
authentication protocols such as HTTP Basic Authentication.
.\"*********************************************************
.TP
.B \-\-http-proxy-retry
Retry indefinitely on HTTP proxy errors. If an HTTP proxy error
occurs, simulate a SIGUSR1 reset.
.\"*********************************************************
.TP
.B \-\-http-proxy-timeout n
Set proxy timeout to
.B n
seconds, default=5.
.\"*********************************************************
.TP
.B \-\-http-proxy-option type [parm]
Set extended HTTP proxy options.
Repeat to set multiple options.
.B VERSION version \-\-
Set HTTP version number to
.B version
(default=1.0).
.B AGENT user-agent \-\-
Set HTTP "User-Agent" string to
.B user-agent.
.B CUSTOM\-HEADER name content \-\-
Adds the custom Header with
.B name
as name and
.B content
as the content of the custom HTTP header.
.\"*********************************************************
.TP
.B \-\-socks-proxy server [port] [authfile]
Connect to remote host through a Socks5 proxy at address
.B server
and port
.B port
(default=1080).
.B authfile
(optional) is a file containing a username and password on 2 lines, or
"stdin" to prompt from console.
.\"*********************************************************
.TP
.B \-\-socks-proxy-retry
Retry indefinitely on Socks proxy errors. If a Socks proxy error
occurs, simulate a SIGUSR1 reset.
.\"*********************************************************
.TP
.B \-\-resolv-retry n
If hostname resolve fails for
.B \-\-remote,
retry resolve for
.B n
seconds before failing.
Set
.B n
to "infinite" to retry indefinitely.
By default,
.B \-\-resolv-retry infinite
is enabled. You can disable by setting n=0.
.\"*********************************************************
.TP
.B \-\-float
Allow remote peer to change its IP address and/or port number, such as due to
DHCP (this is the default if
.B \-\-remote
is not used).
.B \-\-float
when specified with
.B \-\-remote
allows an OpenVPN session to initially connect to a peer
at a known address, however if packets arrive from a new
address and pass all authentication tests, the new address
will take control of the session. This is useful when
you are connecting to a peer which holds a dynamic address
such as a dial-in user or DHCP client.
Essentially,
.B \-\-float
tells OpenVPN to accept authenticated packets
from any address, not only the address which was specified in the
.B \-\-remote
option.
.\"*********************************************************
.TP
.B \-\-ipchange cmd
Run command
.B cmd
when our remote ip-address is initially authenticated or
changes.
.B cmd
consists of a path to script (or executable program), optionally
followed by arguments. The path and arguments may be single- or double-quoted
and/or escaped using a backslash, and should be separated by one or more spaces.
When
.B cmd
is executed two arguments are appended after any arguments specified in
.B cmd
, as follows:
.B cmd ip_address port_number
Don't use
.B \-\-ipchange
in
.B \-\-mode server
mode. Use a
.B \-\-client-connect
script instead.
See the "Environmental Variables" section below for
additional parameters passed as environmental variables.
If you are running in a dynamic IP address environment where
the IP addresses of either peer could change without notice,
you can use this script, for example, to edit the
.I /etc/hosts
file with the current address of the peer. The script will
be run every time the remote peer changes its IP address.
Similarly if
.I our
IP address changes due to DHCP, we should configure
our IP address change script (see man page for
.BR dhcpcd (8)
) to deliver a
.B SIGHUP
or
.B SIGUSR1
signal to OpenVPN. OpenVPN will then
reestablish a connection with its most recently authenticated
peer on its new IP address.
.\"*********************************************************
.TP
.B \-\-port port
TCP/UDP port number or port name for both local and remote. The current
default of 1194 represents the official IANA port number
assignment for OpenVPN and has been used since version 2.0-beta17.
Previous versions used port 5000 as the default.
.\"*********************************************************
.TP
.B \-\-lport port
TCP/UDP port number or name for bind.
.\"*********************************************************
.TP
.B \-\-rport port
TCP/UDP port number or name for remote.
.\"*********************************************************
.TP
.B \-\-bind [ipv6only]
Bind to local address and port. This is the default unless any of
.B \-\-proto tcp-client
,
.B \-\-http-proxy
or
.B \-\-socks-proxy
are used.
If the
.B ipv6only
keyword is present OpenVPN will bind only to IPv6 (as oposed
to IPv6 and IPv4) when a IPv6 socket is opened.
.\"*********************************************************
.TP
.B \-\-nobind
Do not bind to local address and port. The IP stack will allocate
a dynamic port for returning packets. Since the value of the dynamic port
could not be known in advance by a peer, this option is only suitable for
peers which will be initiating connections by using the
.B \-\-remote
option.
.\"*********************************************************
.TP
.B \-\-dev tunX | tapX | null
TUN/TAP virtual network device (
.B X
can be omitted for a dynamic device.)
See examples section below
for an example on setting up a TUN device.
You must use either tun devices on both ends of the connection
or tap devices on both ends. You cannot mix them, as they
represent different underlying network layers.
.B tun
devices encapsulate IPv4 or IPv6 (OSI Layer 3) while
.B tap
devices encapsulate Ethernet 802.3 (OSI Layer 2).
.\"*********************************************************
.TP
.B \-\-dev-type device-type
Which device type are we using?
.B device-type
should be
.B tun
(OSI Layer 3)
or
.B tap
(OSI Layer 2).
Use this option only if the TUN/TAP device used with
.B \-\-dev
does not begin with
.B tun
or
.B tap.
.\"*********************************************************
.TP
.B \-\-topology mode
Configure virtual addressing topology when running in
.B \-\-dev tun
mode. This directive has no meaning in
.B \-\-dev tap
mode, which always uses a
.B subnet
topology.
If you set this directive on the server, the
.B \-\-server
and
.B \-\-server-bridge
directives will automatically push your chosen topology setting to clients
as well. This directive can also be manually pushed to clients. Like the
.B \-\-dev
directive, this directive must always be compatible between client and server.
.B mode
can be one of:
.B net30 \-\-
Use a point-to-point topology, by allocating one /30 subnet per client.
This is designed to allow point-to-point semantics when some
or all of the connecting clients might be Windows systems. This is the
default on OpenVPN 2.0.
.B p2p \-\-
Use a point-to-point topology where the remote endpoint of the client's
tun interface always points to the local endpoint of the server's tun interface.
This mode allocates a single IP address per connecting client.
Only use
when none of the connecting clients are Windows systems. This mode
is functionally equivalent to the
.B \-\-ifconfig-pool-linear
directive which is available in OpenVPN 2.0 and is now deprecated.
.B subnet \-\-
Use a subnet rather than a point-to-point topology by
configuring the tun interface with a local IP address and subnet mask,
similar to the topology used in
.B \-\-dev tap
and ethernet bridging mode.
This mode allocates a single IP address per connecting client and works on
Windows as well. Only available when server and clients are OpenVPN 2.1 or
higher, or OpenVPN 2.0.x which has been manually patched with the
.B \-\-topology
directive code. When used on Windows, requires version 8.2 or higher
of the TAP-Win32 driver. When used on *nix, requires that the tun
driver supports an
.BR ifconfig (8)
command which sets a subnet instead of a remote endpoint IP address.
This option exists in OpenVPN 2.1 or higher.
.\"*********************************************************
.TP
.B \-\-tun-ipv6
Build a tun link capable of forwarding IPv6 traffic.
Should be used in conjunction with
.B \-\-dev tun
or
.B \-\-dev tunX.
A warning will be displayed
if no specific IPv6 TUN support for your OS has been compiled into OpenVPN.
See below for further IPv6-related configuration options.
.\"*********************************************************
.TP
.B \-\-dev-node node
Explicitly set the device node rather than using
/dev/net/tun, /dev/tun, /dev/tap, etc. If OpenVPN
cannot figure out whether
.B node
is a TUN or TAP device based on the name, you should
also specify
.B \-\-dev-type tun
or
.B \-\-dev-type tap.
Under Mac OS X this option can be used to specify the default tun
implementation. Using
.B \-\-dev\-node utun
forces usage of the native Darwin tun kernel support. Use
.B \-\-dev\-node utunN
to select a specific utun instance. To force using the tun.kext (/dev/tunX) use
.B \-\-dev\-node tun\fR.
When not specifying a
.B \-\-dev\-node
option openvpn will first try to open utun, and fall back to tun.kext.
On Windows systems, select the TAP-Win32 adapter which
is named
.B node
in the Network Connections Control Panel or the
raw GUID of the adapter enclosed by braces.
The
.B \-\-show-adapters
option under Windows can also be used
to enumerate all available TAP-Win32
adapters and will show both the network
connections control panel name and the GUID for
each TAP-Win32 adapter.
.TP
.B \-\-lladdr address
Specify the link layer address, more commonly known as the MAC address.
Only applied to TAP devices.
.\"*********************************************************
.TP
.B \-\-iproute cmd
Set alternate command to execute instead of default iproute2 command.
May be used in order to execute OpenVPN in unprivileged environment.
.\"*********************************************************
.TP
.B \-\-ifconfig l rn
Set TUN/TAP adapter parameters.
.B l
is the IP address of the local VPN endpoint.
For TUN devices,
.B rn
is the IP address of the remote VPN endpoint.
For TAP devices,
.B rn
is the subnet mask of the virtual ethernet segment
which is being created or connected to.
For TUN devices, which facilitate virtual
point-to-point IP connections,
the proper usage of
.B \-\-ifconfig
is to use two private IP addresses
which are not a member of any
existing subnet which is in use.
The IP addresses may be consecutive
and should have their order reversed
on the remote peer. After the VPN
is established, by pinging
.B rn,
you will be pinging across the VPN.
For TAP devices, which provide
the ability to create virtual
ethernet segments,
.B \-\-ifconfig
is used to set an IP address and
subnet mask just as a physical
ethernet adapter would be
similarly configured. If you are
attempting to connect to a remote
ethernet bridge, the IP address
and subnet should be set to values
which would be valid on the
the bridged ethernet segment (note
also that DHCP can be used for the
same purpose).
This option, while primarily a proxy for the
.BR ifconfig (8)
command, is designed to simplify TUN/TAP
tunnel configuration by providing a
standard interface to the different
ifconfig implementations on different
platforms.
.B \-\-ifconfig
parameters which are IP addresses can
also be specified as a DNS or /etc/hosts
file resolvable name.
For TAP devices,
.B \-\-ifconfig
should not be used if the TAP interface will be
getting an IP address lease from a DHCP
server.
.\"*********************************************************
.TP
.B \-\-ifconfig-noexec
Don't actually execute ifconfig/netsh commands, instead
pass
.B \-\-ifconfig
parameters to scripts using environmental variables.
.\"*********************************************************
.TP
.B \-\-ifconfig-nowarn
Don't output an options consistency check warning
if the
.B \-\-ifconfig
option on this side of the
connection doesn't match the remote side. This is useful
when you want to retain the overall benefits of the
options consistency check (also see
.B \-\-disable-occ
option) while only disabling the ifconfig component of
the check.
For example,
if you have a configuration where the local host uses
.B \-\-ifconfig
but the remote host does not, use
.B \-\-ifconfig-nowarn
on the local host.
This option will also silence warnings about potential
address conflicts which occasionally annoy more experienced
users by triggering "false positive" warnings.
.\"*********************************************************
.TP
.B \-\-route network/IP [netmask] [gateway] [metric]
Add route to routing table after connection is established.
Multiple routes can be specified. Routes will be
automatically torn down in reverse order prior to
TUN/TAP device close.
This option is intended as
a convenience proxy for the
.BR route (8)
shell command,
while at the same time providing portable semantics
across OpenVPN's platform space.
.B netmask
default \-\- 255.255.255.255
.B gateway
default \-\- taken from
.B \-\-route-gateway
or the second parameter to
.B \-\-ifconfig
when
.B \-\-dev tun
is specified.
.B metric
default \-\- taken from
.B \-\-route-metric
otherwise 0.
The default can be specified by leaving an option blank or setting
it to "default".
The
.B network
and
.B gateway
parameters can
also be specified as a DNS or /etc/hosts
file resolvable name, or as one of three special keywords:
.B vpn_gateway
\-\- The remote VPN endpoint address
(derived either from
.B \-\-route-gateway
or the second parameter to
.B \-\-ifconfig
when