Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

README 3.1 KiB

il y a 9 ans
il y a 9 ans
il y a 9 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. Juniper VPN Authenticator:
  2. This script authenticates with a Juniper VPN server to generate a session
  3. cookie (DSID), and then passes that cookie to a VPN client.
  4. Example usage with openconnect:
  5. ./juniper-vpn.py --host vpn.example.com --username joeuser --stdin DSID=%DSID% \
  6. openconnect --juniper %HOST% --cookie-on-stdin
  7. This will connect to vpn.example.com and prompt the user for a authentication
  8. password. Once authenticated, the session cookie will be passed to openconnect
  9. which will connect to the VPN. Note that because the DSID provides full access
  10. to the VPN, it can be easily passed via stdin to avoid having it show up
  11. in the process list.
  12. Juniper Networks Host Checker:
  13. A python module, tncc.py, is integrated with juniper-vpn.py and provides
  14. support for VPN sites which require a host checker step. It is currently only
  15. tested on a subset of sites and does not yet support sites that require
  16. periodic host checker updates.
  17. Command line options:
  18. juniper-vpn.py [-h HOST] [-u USERNAME] [-o OATH] [-c CONFIG] [-s STDIN] \
  19. <external program> <external program arguments...>
  20. -h --host
  21. VPN server to access. This option is required.
  22. -u --username
  23. Username to authenticate with. This option is required.
  24. -p --pass_prefix
  25. Optional, used for passwords composed of fixed prefix and variable postfix.
  26. This is fixed prefix part.
  27. -o --oath
  28. OATH key to use for OTP generation if required for authentication.
  29. Key should be in hex format.
  30. -c --config
  31. Config file. Rather than passing arguments on the command line,
  32. they can be contained within a config file. Command line arguments
  33. override config file options. See sample.cfg for documentation.
  34. -s --stdin
  35. Provide input to external program. This allows the cookie to be passed
  36. on stdin, avoiding having it appear in the process list. The string
  37. %DSID% will be replaced with the DSID cookie value. The string %HOST%
  38. will be replaced with the server hostname.
  39. <external program> <external program arguments...>
  40. Runs the external program with the supplied arguments when a cookie
  41. is generated. %DSID% in any argument is replaced with the DSID cookie
  42. value. %HOST% in any argument is replaced with the server hostname.
  43. If the external program returns a positive return code, it is assumed
  44. that a fatal error has occurred (such as bad command line arguments)
  45. and the script exits. If the external program returns -EPERM, it is
  46. assumed that the DSID is no longer valid and a new one is generated.
  47. For all other return codes, the external program is simply called again.
  48. An external program is required.
  49. Running without root or tun access:
  50. openconnect provides two options for running without any special permissions.
  51. The first option is to create a tun device in advance and configure permissions
  52. for user access.
  53. The second is to redirect the traffic for the tun device to an external program.
  54. This external program can then configure a user-level SOCKS proxy:
  55. ./juniper-vpn.py -c example.cfg -s DSID=%DSID% \
  56. openconnect --juniper %HOST% --cookie-on-stdin --script-tun \
  57. --script "tunsocks -D 1080"
  58. Both tunsocks and ocproxy can perform this role:
  59. http://github.com/russdill/tunsocks
  60. http://repo.or.cz/w/ocproxy.git