svn cleanup
[anytun.git] / openvpn / sample-config-files / openvpn-startup.sh
blob0ee006bc3007884182abd8cbba1b4e83a9bbc07f
1 #!/bin/sh
3 # A sample OpenVPN startup script
4 # for Linux.
6 # openvpn config file directory
7 dir=/etc/openvpn
9 # load the firewall
10 $dir/firewall.sh
12 # load TUN/TAP kernel module
13 modprobe tun
15 # enable IP forwarding
16 echo 1 > /proc/sys/net/ipv4/ip_forward
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.
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.
32 openvpn --cd $dir --daemon --config vpn1.conf
33 openvpn --cd $dir --daemon --config vpn2.conf
34 openvpn --cd $dir --daemon --config vpn2.conf