1 | ##############################################
|
---|
2 | # Sample client-side OpenVPN 2.0 config file #
|
---|
3 | # for connecting to multi-client server. #
|
---|
4 | # #
|
---|
5 | # This configuration can be used by multiple #
|
---|
6 | # clients, however each client should have #
|
---|
7 | # its own cert and key files. #
|
---|
8 | # #
|
---|
9 | # On Windows, you might want to rename this #
|
---|
10 | # file so it has a .ovpn extension #
|
---|
11 | ##############################################
|
---|
12 | # Specify that we are a client and that we
|
---|
13 | # will be pulling certain config file directives
|
---|
14 | # from the server.
|
---|
15 | client
|
---|
16 |
|
---|
17 | # Use the same setting as you are using on
|
---|
18 | # the server.
|
---|
19 | # On most systems, the VPN will not function
|
---|
20 | # unless you partially or fully disable
|
---|
21 | # the firewall for the TUN/TAP interface.
|
---|
22 | dev tun
|
---|
23 |
|
---|
24 | # Windows needs the TAP-Win32 adapter name
|
---|
25 | # from the Network Connections panel
|
---|
26 | # if you have more than one. On XP SP2,
|
---|
27 | # you may need to disable the firewall
|
---|
28 | # for the TAP adapter.
|
---|
29 | ;dev-node MyTap
|
---|
30 |
|
---|
31 | # Are we connecting to a TCP or
|
---|
32 | # UDP server? Use the same setting as
|
---|
33 | # on the server.
|
---|
34 | ;proto tcp
|
---|
35 | proto udp
|
---|
36 |
|
---|
37 | # The hostname/IP and port of the server.
|
---|
38 | # You can have multiple remote entries
|
---|
39 | # to load balance between the servers.
|
---|
40 | ;remote my-server-1 1194
|
---|
41 | ;remote my-server-2 1194
|
---|
42 | remote openvpn.pool.wirelessleiden.nl. 1194
|
---|
43 |
|
---|
44 | # Choose a random host from the remote
|
---|
45 | # list for load-balancing. Otherwise
|
---|
46 | # try hosts in the order specified.
|
---|
47 | ;remote-random
|
---|
48 |
|
---|
49 | # Keep trying indefinitely to resolve the
|
---|
50 | # host name of the OpenVPN server. Very useful
|
---|
51 | # on machines which are not permanently connected
|
---|
52 | # to the internet such as laptops.
|
---|
53 | resolv-retry infinite
|
---|
54 |
|
---|
55 | # Most clients don't need to bind to
|
---|
56 | # a specific local port number.
|
---|
57 | nobind
|
---|
58 |
|
---|
59 | # Downgrade privileges after initialization (non-Windows only)
|
---|
60 | ;user nobody
|
---|
61 | ;group nobody
|
---|
62 |
|
---|
63 | # Try to preserve some state across restarts.
|
---|
64 | persist-key
|
---|
65 | persist-tun
|
---|
66 |
|
---|
67 | # If you are connecting through an
|
---|
68 | # HTTP proxy to reach the actual OpenVPN
|
---|
69 | # server, put the proxy server/IP and
|
---|
70 | # port number here. See the man page
|
---|
71 | # if your proxy server requires
|
---|
72 | # authentication.
|
---|
73 | ;http-proxy-retry # retry on connection failures
|
---|
74 | ;http-proxy [proxy server] [proxy port #]
|
---|
75 |
|
---|
76 | # Wireless networks often produce a lot
|
---|
77 | # of duplicate packets. Set this flag
|
---|
78 | # to silence duplicate packet warnings.
|
---|
79 | ;mute-replay-warnings
|
---|
80 |
|
---|
81 | # SSL/TLS parms.
|
---|
82 | # See the server config file for more
|
---|
83 | # description. It's best to use
|
---|
84 | # a separate .crt/.key file pair
|
---|
85 | # for each client. A single ca
|
---|
86 | # file can be used for all clients.
|
---|
87 | ca /usr/local/etc/openvpn/ca.crt
|
---|
88 | cert /usr/local/etc/openvpn/client.crt
|
---|
89 | key /usr/local/etc/openvpn/client.key
|
---|
90 |
|
---|
91 | # Verify server certificate by checking
|
---|
92 | # that the certicate has the nsCertType
|
---|
93 | # field set to "server". This is an
|
---|
94 | # important precaution to protect against
|
---|
95 | # a potential attack discussed here:
|
---|
96 | # http://openvpn.net/howto.html#mitm
|
---|
97 | #
|
---|
98 | # To use this feature, you will need to generate
|
---|
99 | # your server certificates with the nsCertType
|
---|
100 | # field set to "server". The build-key-server
|
---|
101 | # script in the easy-rsa folder will do this.
|
---|
102 | ns-cert-type server
|
---|
103 |
|
---|
104 | # If a tls-auth key is used on the server
|
---|
105 | # then every client must also have the key.
|
---|
106 | tls-auth /usr/local/etc/openvpn/ta.key 1
|
---|
107 |
|
---|
108 | # Select a cryptographic cipher.
|
---|
109 | # If the cipher option is used on the server
|
---|
110 | # then you must also specify it here.
|
---|
111 | ;cipher x
|
---|
112 |
|
---|
113 | # Enable compression on the VPN link.
|
---|
114 | # Don't enable this unless it is also
|
---|
115 | # enabled in the server config file.
|
---|
116 | comp-lzo
|
---|
117 |
|
---|
118 | # Set log file verbosity.
|
---|
119 | verb 3
|
---|
120 |
|
---|
121 | # Silence repeating messages
|
---|
122 | ;mute 20
|
---|
123 |
|
---|
124 | # Use syslog by default
|
---|
125 | syslog
|
---|
126 |
|
---|
127 | # Allow calling external scripts
|
---|
128 | script-security 2
|
---|
129 |
|
---|
130 | # Make sure to keep some traffic running, to keep the Firewall (NAT) state tables in between happy.
|
---|
131 | keepalive 2 24
|
---|
132 |
|
---|
133 | # Keep trying
|
---|
134 | resolv-retry infinite
|
---|