Advertisement
Guest User

Untitled

a guest
Jun 16th, 2012
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.45 KB | None | 0 0
  1. # Which local IP address should OpenVPN
  2. # listen on? (optional)
  3. local 176.9.**.**
  4. ##IP-to
  5.  
  6. # Which TCP/UDP port should OpenVPN listen on?
  7. # If you want to run multiple OpenVPN instances
  8. # on the same machine, use a different port
  9. # number for each one. You will need to
  10. # open up this port on your firewall.
  11. port 1194
  12.  
  13. # TCP or UDP server?
  14. ;proto tcp
  15. proto udp
  16.  
  17. # "dev tun" will create a routed IP tunnel,
  18. # "dev tap" will create an ethernet tunnel.
  19. # Use "dev tap0" if you are ethernet bridging
  20. # and have precreated a tap0 virtual interface
  21. # and bridged it with your ethernet interface.
  22. # If you want to control access policies
  23. # over the VPN, you must create firewall
  24. # rules for the the TUN/TAP interface.
  25. # On non-Windows systems, you can give
  26. # an explicit unit number, such as tun0.
  27. # On Windows, use "dev-node" for this.
  28. # On most systems, the VPN will not function
  29. # unless you partially or fully disable
  30. # the firewall for the TUN/TAP interface.
  31. dev tap0
  32. ;dev tun
  33.  
  34. # Windows needs the TAP-Win32 adapter name
  35. # from the Network Connections panel if you
  36. # have more than one. On XP SP2 or higher,
  37. # you may need to selectively disable the
  38. # Windows firewall for the TAP adapter.
  39. # Non-Windows systems usually don't need this.
  40. ;dev-node MyTap
  41.  
  42. # SSL/TLS root certificate (ca), certificate
  43. # (cert), and private key (key). Each client
  44. # and the server must have their own cert and
  45. # key file. The server and all clients will
  46. # use the same ca file.
  47. #
  48. # See the "easy-rsa" directory for a series
  49. # of scripts for generating RSA certificates
  50. # and private keys. Remember to use
  51. # a unique Common Name for the server
  52. # and each of the client certificates.
  53. #
  54. # Any X509 key management system can be used.
  55. # OpenVPN can also use a PKCS #12 formatted key file
  56. # (see "pkcs12" directive in man page).
  57. ca ca.crt
  58. cert server.crt
  59. key server.key # This file should be kept secret
  60.  
  61. # Diffie hellman parameters.
  62. # Generate your own with:
  63. # openssl dhparam -out dh1024.pem 1024
  64. # Substitute 2048 for 1024 if you are using
  65. # 2048 bit keys.
  66. dh dh1024.pem
  67.  
  68. # Configure server mode and supply a VPN subnet
  69. # for OpenVPN to draw client addresses from.
  70. # The server will take 10.8.0.1 for itself,
  71. # the rest will be made available to clients.
  72. # Each client will be able to reach the server
  73. # on 10.8.0.1. Comment this line out if you are
  74. # ethernet bridging. See the man page for more info.
  75. ;server 10.8.0.0 255.255.255.0
  76.  
  77. # Maintain a record of client <-> virtual IP address
  78. # associations in this file. If OpenVPN goes down or
  79. # is restarted, reconnecting clients can be assigned
  80. # the same virtual IP address from the pool that was
  81. # previously assigned.
  82. ifconfig-pool-persist ipp.txt
  83.  
  84. # Configure server mode for ethernet bridging.
  85. # You must first use your OS's bridging capability
  86. # to bridge the TAP interface with the ethernet
  87. # NIC interface. Then you must manually set the
  88. # IP/netmask on the bridge interface, here we
  89. # assume 10.8.0.4/255.255.255.0. Finally we
  90. # must set aside an IP range in this subnet
  91. # (start=10.8.0.50 end=10.8.0.100) to allocate
  92. # to connecting clients. Leave this line commented
  93. # out unless you are ethernet bridging.
  94. #server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
  95. server-bridge 192.168.101.50 255.255.255.0 192.168.101.85 192.168.101.99
  96.  
  97. # Configure server mode for ethernet bridging
  98. # using a DHCP-proxy, where clients talk
  99. # to the OpenVPN server-side DHCP server
  100. # to receive their IP address allocation
  101. # and DNS server addresses. You must first use
  102. # your OS's bridging capability to bridge the TAP
  103. # interface with the ethernet NIC interface.
  104. # Note: this mode only works on clients (such as
  105. # Windows), where the client-side TAP adapter is
  106. # bound to a DHCP client.
  107. ;server-bridge
  108.  
  109. # Push routes to the client to allow it
  110. # to reach other private subnets behind
  111. # the server. Remember that these
  112. # private subnets will also need
  113. # to know to route the OpenVPN client
  114. # address pool (10.8.0.0/255.255.255.0)
  115. # back to the OpenVPN server.
  116. ;push "route 192.168.10.0 255.255.255.0"
  117. ;push "route 192.168.20.0 255.255.255.0"
  118.  
  119. # To assign specific IP addresses to specific
  120. # clients or if a connecting client has a private
  121. # subnet behind it that should also have VPN access,
  122. # use the subdirectory "ccd" for client-specific
  123. # configuration files (see man page for more info).
  124.  
  125. # EXAMPLE: Suppose the client
  126. # having the certificate common name "Thelonious"
  127. # also has a small subnet behind his connecting
  128. # machine, such as 192.168.40.128/255.255.255.248.
  129. # First, uncomment out these lines:
  130. ;client-config-dir ccd
  131. ;route 192.168.40.128 255.255.255.248
  132. # Then create a file ccd/Thelonious with this line:
  133. # iroute 192.168.40.128 255.255.255.248
  134. # This will allow Thelonious' private subnet to
  135. # access the VPN. This example will only work
  136. # if you are routing, not bridging, i.e. you are
  137. # using "dev tun" and "server" directives.
  138.  
  139. # EXAMPLE: Suppose you want to give
  140. # Thelonious a fixed VPN IP address of 10.9.0.1.
  141. # First uncomment out these lines:
  142. ;client-config-dir ccd
  143. ;route 10.9.0.0 255.255.255.252
  144. # Then add this line to ccd/Thelonious:
  145. # ifconfig-push 10.9.0.1 10.9.0.2
  146.  
  147. # Suppose that you want to enable different
  148. # firewall access policies for different groups
  149. # of clients. There are two methods:
  150. # (1) Run multiple OpenVPN daemons, one for each
  151. # group, and firewall the TUN/TAP interface
  152. # for each group/daemon appropriately.
  153. # (2) (Advanced) Create a script to dynamically
  154. # modify the firewall in response to access
  155. # from different clients. See man
  156. # page for more info on learn-address script.
  157. ;learn-address ./script
  158.  
  159. # If enabled, this directive will configure
  160. # all clients to redirect their default
  161. # network gateway through the VPN, causing
  162. # all IP traffic such as web browsing and
  163. # and DNS lookups to go through the VPN
  164. # (The OpenVPN server machine may need to NAT
  165. # or bridge the TUN/TAP interface to the internet
  166. # in order for this to work properly).
  167. ;push "redirect-gateway def1 bypass-dhcp"
  168.  
  169. # Certain Windows-specific network settings
  170. # can be pushed to clients, such as DNS
  171. # or WINS server addresses. CAVEAT:
  172. # http://openvpn.net/faq.html#dhcpcaveats
  173. # The addresses below refer to the public
  174. # DNS servers provided by opendns.com.
  175. push "dhcp-option DNS 208.67.222.222"
  176. push "dhcp-option DNS 208.67.220.220"
  177.  
  178. # Uncomment this directive to allow different
  179. # clients to be able to "see" each other.
  180. # By default, clients will only see the server.
  181. # To force clients to only see the server, you
  182. # will also need to appropriately firewall the
  183. # server's TUN/TAP interface.
  184. client-to-client
  185.  
  186. # Uncomment this directive if multiple clients
  187. # might connect with the same certificate/key
  188. # files or common names. This is recommended
  189. # only for testing purposes. For production use,
  190. # each client should have its own certificate/key
  191. # pair.
  192. #
  193. # IF YOU HAVE NOT GENERATED INDIVIDUAL
  194. # CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
  195. # EACH HAVING ITS OWN UNIQUE "COMMON NAME",
  196. # UNCOMMENT THIS LINE OUT.
  197. ;duplicate-cn
  198.  
  199. # The keepalive directive causes ping-like
  200. # messages to be sent back and forth over
  201. # the link so that each side knows when
  202. # the other side has gone down.
  203. # Ping every 10 seconds, assume that remote
  204. # peer is down if no ping received during
  205. # a 120 second time period.
  206. keepalive 10 120
  207.  
  208. # For extra security beyond that provided
  209. # by SSL/TLS, create an "HMAC firewall"
  210. # to help block DoS attacks and UDP port flooding.
  211. #
  212. # Generate with:
  213. # openvpn --genkey --secret ta.key
  214. #
  215. # The server and each client must have
  216. # a copy of this key.
  217. # The second parameter should be '0'
  218. # on the server and '1' on the clients.
  219. tls-auth ta.key 0 # This file is secret
  220.  
  221. # Select a cryptographic cipher.
  222. # This config item must be copied to
  223. # the client config file as well.
  224. ;cipher BF-CBC # Blowfish (default)
  225. ;cipher AES-128-CBC # AES
  226. ;cipher DES-EDE3-CBC # Triple-DES
  227.  
  228. # Enable compression on the VPN link.
  229. # If you enable it here, you must also
  230. # enable it in the client config file.
  231. comp-lzo
  232.  
  233. # The maximum number of concurrently connected
  234. # clients we want to allow.
  235. ;max-clients 100
  236.  
  237. # It's a good idea to reduce the OpenVPN
  238. # daemon's privileges after initialization.
  239. #
  240. # You can uncomment this out on
  241. # non-Windows systems.
  242. user nobody
  243. group nogroup
  244.  
  245. # The persist options will try to avoid
  246. # accessing certain resources on restart
  247. # that may no longer be accessible because
  248. # of the privilege downgrade.
  249. persist-key
  250. persist-tun
  251.  
  252. # Output a short status file showing
  253. # current connections, truncated
  254. # and rewritten every minute.
  255. status openvpn-status.log
  256.  
  257. # By default, log messages will go to the syslog (or
  258. # on Windows, if running as a service, they will go to
  259. # the "\Program Files\OpenVPN\log" directory).
  260. # Use log or log-append to override this default.
  261. # "log" will truncate the log file on OpenVPN startup,
  262. # while "log-append" will append to it. Use one
  263. # or the other (but not both).
  264. ;log openvpn.log
  265. ;log-append openvpn.log
  266.  
  267. # Set the appropriate level of log
  268. # file verbosity.
  269. #
  270. # 0 is silent, except for fatal errors
  271. # 4 is reasonable for general usage
  272. # 5 and 6 can help to debug connection problems
  273. # 9 is extremely verbose
  274. verb 3
  275.  
  276. # Silence repeating messages. At most 20
  277. # sequential messages of the same message
  278. # category will be output to the log.
  279. ;mute 20
  280.  
  281. #Todor Start/stop
  282. up "/etc/openvpn/up.sh br0"
  283. down "/etc/openvpn/down.sh br0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement