You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB

  1. The openconnect server expects to be configured using the uci interface.
  2. To setup a server the provides access to LAN with network address
  3. 10.100.2.0/255.255.255.0 using the VPN address range
  4. 10.100.3.0/255.255.255.0 add the following to /etc/config/ocserv:
  5. ----/etc/config/ocserv-------------------------------------------
  6. config ocserv 'config'
  7. option port '4443'
  8. option dpd '120'
  9. option max_clients '8'
  10. option max_same '2'
  11. option netmask '255.255.255.0'
  12. option ipaddr '10.100.3.0'
  13. option auth 'plain'
  14. option zone 'vpn'
  15. option default_domain 'lan'
  16. option compression '1'
  17. option enable '1'
  18. config dns
  19. option ip '10.100.2.1'
  20. config routes
  21. option ip '10.100.2.0'
  22. option netmask '255.255.255.0'
  23. config ocservusers
  24. option name 'test'
  25. option password '$5$unl8uKAGNsdTh9zm$PnUHEGhDc5VHbFE2EfWwW38Bub6Y6EZ5hrFwZE1r2F1'
  26. -----------------------------------------------------------------
  27. This configuration also adds the user "test" with password "test". The
  28. password is specified in the crypt(3) format.
  29. The server can be enabled and started using:
  30. # /etc/init.d/ocserv enable
  31. # /etc/init.d/ocserv start
  32. To simplify firewall configuration, you should setup an unmanaged interface
  33. (e.g., called vpn), and will have assigned the 'vpns+' interfaces. Then a zone
  34. called vpn should be setup to handle interactions with lan. An example
  35. follows:
  36. ----/etc/config/network------------------------------------------
  37. config interface 'vpn'
  38. option proto 'none'
  39. option ifname 'vpns+'
  40. -----------------------------------------------------------------
  41. ----/etc/config/firewall-----------------------------------------
  42. config zone
  43. option input 'ACCEPT'
  44. option forward 'REJECT'
  45. option output 'ACCEPT'
  46. option name 'vpn'
  47. option device 'vpns+'
  48. option network 'vpn'
  49. config forwarding
  50. option dest 'lan'
  51. option src 'vpn'
  52. config forwarding
  53. option dest 'vpn'
  54. option src 'lan'
  55. -----------------------------------------------------------------
  56. There is a luci plugin to allow configuring the server from
  57. the web environment; see the package luci-app-ocserv.