Ticket #9141: openvpn_config

File openvpn_config, 3.2 KB (added by tomas@…, 6 years ago)

used OpenVPN UCI config

Line 
1package openvpn
2
3##############################################
4# Sample client-side OpenVPN 2.0 uci config  #
5# for connecting to multi-client server.     #
6##############################################
7
8config openvpn bp
9
10        # Set to 1 to enable this instance:
11        option enable 1
12
13        # Specify that we are a client and that we
14        # will be pulling certain config file directives
15        # from the server.
16        option client 1
17        option remote-cert-tls 'server'
18
19        # Use the same setting as you are using on
20        # the server.
21        # On most systems, the VPN will not function
22        # unless you partially or fully disable
23        # the firewall for the TUN/TAP interface.
24#       option dev tap
25        option dev tun
26
27        # Are we connecting to a TCP or
28        # UDP server?  Use the same setting as
29        # on the server.
30#       option proto tcp
31        option proto udp
32
33        # The hostname/IP and port of the server.
34        # You can have multiple remote entries
35        # to load balance between the servers.
36        list remote "W.X.Y.Z 1194"
37
38        # Choose a random host from the remote
39        # list for load_balancing.  Otherwise
40        # try hosts in the order specified.
41#       option remote_random 1
42
43        # Keep trying indefinitely to resolve the
44        # host name of the OpenVPN server.  Very useful
45        # on machines which are not permanently connected
46        # to the internet such as laptops.
47        option resolv_retry infinite
48
49        # Most clients don't need to bind to
50        # a specific local port number.
51        option nobind 1
52
53        # Try to preserve some state across restarts.
54        option persist_key 1
55        option persist_tun 1
56
57        # If you are connecting through an
58        # HTTP proxy to reach the actual OpenVPN
59        # server, put the proxy server/IP and
60        # port number here.  See the man page
61        # if your proxy server requires
62        # authentication.
63        # retry on connection failures:
64#       option http_proxy_retry 1
65        # specify http proxy address and port:
66#       option http_proxy "192.168.1.100 8080"
67
68        # Wireless networks often produce a lot
69        # of duplicate packets.  Set this flag
70        # to silence duplicate packet warnings.
71#       option mute_replay_warnings 1
72
73        # SSL/TLS parms.
74        # See the server config file for more
75        # description.  It's best to use
76        # a separate .crt/.key file pair
77        # for each client.  A single ca
78        # file can be used for all clients.
79        option ca /etc/openvpn/ca.crt
80        option cert /etc/openvpn/client.crt
81        option key /etc/openvpn/client.key
82
83        # Verify server certificate by checking
84        # that the certicate has the nsCertType
85        # field set to "server".  This is an
86        # important precaution to protect against
87        # a potential attack discussed here:
88        #  http://openvpn.net/howto.html#mitm
89        #
90        # To use this feature, you will need to generate
91        # your server certificates with the nsCertType
92        # field set to "server".  The build_key_server
93        # script in the easy_rsa folder will do this.
94#       option ns_cert_type server
95
96        # If a tls_auth key is used on the server
97        # then every client must also have the key.
98#       option tls_auth "/etc/openvpn/ta.key 1"
99
100        # Select a cryptographic cipher.
101        # If the cipher option is used on the server
102        # then you must also specify it here.
103#       option cipher x
104
105        # Enable compression on the VPN link.
106        # Don't enable this unless it is also
107        # enabled in the server config file.
108        option comp_lzo 1
109
110        # Set log file verbosity.
111        option verb 3
112
113        # Silence repeating messages
114        option mute 20