{"id":22397128,"url":"https://github.com/archef2000/ocserv","last_synced_at":"2025-09-01T04:39:43.344Z","repository":{"id":123872168,"uuid":"549740601","full_name":"archef2000/ocserv","owner":"archef2000","description":"Open Connect server in docker","archived":false,"fork":false,"pushed_at":"2023-09-29T07:25:05.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T05:14:10.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archef2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-11T16:57:01.000Z","updated_at":"2022-10-11T17:05:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e95c6e85-e74d-432f-a0eb-7286ca7c3c78","html_url":"https://github.com/archef2000/ocserv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archef2000%2Focserv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archef2000%2Focserv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archef2000%2Focserv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archef2000%2Focserv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archef2000","download_url":"https://codeload.github.com/archef2000/ocserv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245750367,"owners_count":20666164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T06:10:55.428Z","updated_at":"2025-03-26T23:20:40.960Z","avatar_url":"https://github.com/archef2000.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenConnect VPN Server\n\n# Customisation\n* Base: Alpine 3.16\n* Latest OpenConnect Server 1.1.6\n* Size: 90 MB \n* Modification of the listening port, dns servers, routing and authentication\n* Advanced manual configuration for power users\n\n## Basic Configuration\n### Without customizing cert variables\n```\n$ docker run --privileged  -d \\\n              -p 443:443 \\\n              -p 443:443/udp \\\n              -e \"DOMAIN=vpn.example.com\" \\\n              archef2000/ocserv\n```\n### With customizing cert variables\n```\n$ docker run --privileged  -d \\\n              -p 443:443 \\\n              -p 443:443/udp \\\n              -e \"CA_CN=VPN CA\" \\\n              -e \"CA_ORG=OCSERV\" \\\n              -e \"CA_DAYS=9999\" \\\n              -e \"DOMAIN=vpn.example.com\" \\\n              -e \"SRV_ORG=MyCompany\" \\\n              -e \"SRV_DAYS=9999\" \\\n              archef2000/ocserv\n```\n\n```\n$ docker run --privileged  -d \\\n              -v /your/config/path/:/etc/ocserv \\\n              -e \"LISTEN_PORT=443\" \\\n              -e \"DNS_SERVERS=1.1.1.1,8.8.8.8,1.0.0.1,8.8.4.4\" \\\n              -e \"TUNNEL_MODE=split-include\" \\\n              -e \"TUNNEL_ROUTES=192.168.178/24,10.11.0.0/24\" \\\n              -e \"SPLIT_DNS_DOMAINS=example.com\" \\\n              -p 443:443 \\\n              -p 443:443/udp \\\n              archef2000/ocserv\n```\n\n## Advanced Configuration:\nThis container allows for advanced configurations for power users who know what they are doing by **mounting the /etc/ocserv volume to a host directory**. Users can then drop in their own certs and modify the configuration. The **POWER_USER** environmental variable is required to stop the container from overwriting options set from container environment variables. Some advanced features include setting up site to site VPN links, User Groups, Proxy Protocol support and more.\n\n# Variables\n## Environment Variables\n| Variable | Required | Function | Example |\n|----------|----------|----------|----------|\n|`LISTEN_PORT`| No | Listening port for VPN connections|`LISTEN_PORT=443`|\n|`DNS_SERVERS`| No | Comma delimited name servers |`DNS_SERVERS=8.8.8.8,8.8.4.4`|\n|`TUNNEL_MODE`| No | Tunnel mode (all / split-include) |`TUNNEL_MODE=split-include`|\n|`TUNNEL_ROUTES`| No | Comma delimited tunnel routes in CIDR notation |`TUNNEL_ROUTES=192.168.178/24,10.11.0.0/24`|\n|`SPLIT_DNS_DOMAINS`| No | Comma delimited dns domains |`SPLIT_DNS_DOMAINS=example.com`|\n|`POWER_MODE`| No | Allows for advanced manual configuration via host mounted /etc/ocserv volume |`POWER_USER=no`|\n\n## Volumes\n| Volume | Required | Function | Example |\n|----------|----------|----------|----------|\n| `/etc/ocserv` | No | OpenConnect config files | `/your/config/path/:/etc/ocserv`|\n\n## Ports\n| Port | Proto | Required | Function | Example |\n|----------|----------|----------|----------|----------|\n| `443` | TCP | Yes | OpenConnect server TCP listening port | `443:443/tcp`|\n| `443` | UDP | Yes | OpenConnect server UDP listening port | `443:443/udp`|\n\n## Add User/Change Password with Variables\nAdd users by adding var USER_$N and PASS_$N in the Environment Variables.\nExample:\n```\n    USER_1=test\n    PASS_1=test\n    CERT_1=test # For P12 cert if enabled.\n```\n\n\n## Add User/Change Password with commandline\nAdd users by executing the following command on the host running the docker container\n```\ndocker exec -ti openconnect ocpasswd -c /etc/ocserv/ocpasswd user_1\nEnter password:\nRe-enter password:\n```\n\n## Delete User\nDelete users by executing the following command on the host running the docker container\n```\ndocker exec -ti openconnect ocpasswd -c /etc/ocserv/ocpasswd -d user_1\n```\n\n## Login and Logout Log Messages\nAfter a user successfully logins to the VPN a message will be logged in the docker log.\u003cbr\u003e\n*Example of login message:*\n```\nUser user_1 Connected - Server: 192.168.179.165 VPN IP: 192.168.255.194 Remote IP: 10.10.0.188 \n```\n\n*Example of logoff message:*\n```\n User user_1 Disconnected - Bytes In: 175856 Bytes Out: 4746819 Duration:50\n```\n\n# Building the container yourself\nTo build this container, clone the repository and cd into it.\n\n### Build it:\n```\n$ cd /repo/location/openconnect\n$ docker build -t openconnect .\n```\n### Run it:\n```\n$ docker run --privileged  -d \\\n              -p 443:443 \\\n              -p 443:443/udp \\\n              openconnect\n```\n\nThis will start a container as described in the \"Run container from Docker registry\" section. View the other run configurations for more advanced setups.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchef2000%2Focserv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchef2000%2Focserv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchef2000%2Focserv/lists"}