openvpn-startup.sh 776 B

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