iw4p / OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer
255 stars 133 forks source link

Port number and backup users (docker) #23

Closed padfo0ot closed 1 year ago

padfo0ot commented 1 year ago

Hi, thank you for this amazing work. I have 2 questions (docker version):

  1. How can we change the port number after creating the container. Let's say we have configured like 443:443 and now we want to change it to 1234:443 Is there an option to do it without deleting and recreating the container?

  2. How can we backup and restore the user/password file? It should be under /etc/ocserv but how can we access it? If we want to rebuild the image with our own ocserv.conf file, we need to backup this file before that.

Thank you again.

iw4p commented 1 year ago

Hello, You can find users data on /etc/ocserv/ocpasswd path, it's on the container so you can exec to your container to get what you need. And about your first question, you can run your container on your desired port. The connection between docker and your os can be on the port 443 as default, and have to change the PORT:PORT on your docker command to have this service on another port.