~ubuntu-branches/ubuntu/saucy/openvpn/saucy-proposed

« back to all changes in this revision

Viewing changes to sample/sample-config-files/openvpn-startup.sh

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2013-05-24 17:42:45 UTC
  • mfrom: (1.1.19) (10.2.22 sid)
  • Revision ID: package-import@ubuntu.com-20130524174245-g9y6wlforycufqy5
Tags: 2.3.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/openvpn.init.d:
    + Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    + Show per-VPN result messages.
    + Add "--script-security 2" by default for backwards compatabliity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# A sample OpenVPN startup script
 
4
# for Linux.
 
5
 
 
6
# openvpn config file directory
 
7
dir=/etc/openvpn
 
8
 
 
9
# load the firewall
 
10
$dir/firewall.sh
 
11
 
 
12
# load TUN/TAP kernel module
 
13
modprobe tun
 
14
 
 
15
# enable IP forwarding
 
16
echo 1 > /proc/sys/net/ipv4/ip_forward
 
17
 
 
18
# Invoke openvpn for each VPN tunnel
 
19
# in daemon mode.  Alternatively,
 
20
# you could remove "--daemon" from
 
21
# the command line and add "daemon"
 
22
# to the config file.
 
23
#
 
24
# Each tunnel should run on a separate
 
25
# UDP port.  Use the "port" option
 
26
# to control this.  Like all of
 
27
# OpenVPN's options, you can
 
28
# specify "--port 8000" on the command
 
29
# line or "port 8000" in the config
 
30
# file.
 
31
 
 
32
openvpn --cd $dir --daemon --config vpn1.conf
 
33
openvpn --cd $dir --daemon --config vpn2.conf
 
34
openvpn --cd $dir --daemon --config vpn2.conf