Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP requires host networking mode in docker #24

Open
s7p opened this issue Dec 25, 2022 · 1 comment
Open

FTP requires host networking mode in docker #24

s7p opened this issue Dec 25, 2022 · 1 comment

Comments

@s7p
Copy link

s7p commented Dec 25, 2022

First of all, thanks a lot for creating this, this is awesome and is exactly what I needed.

I wasn't able to get alarmserver working using the Docker configs provided in README.md
docker run -d -v $PWD/config.yml:/config.yml -v $PWD/ftp:/ftp -p 21:21 -p 15002:15002 toxuin/alarmserver

I can run alarmserver, and FTP can authenticate a user, but no files can be uploaded. It always produces error 425. I looked into this, and found that FTP will run in passive mode in containers and will open random ports for data exchange with client. So only mapping port 21 is not sufficient, the solution is to use host networking, map out a larger port range, or create a bridge.

Using host networking worked for me. Suggest adding a new command docker run -d -v $PWD/config.yml:/config.yml -v $PWD/ftp:/ftp --network host toxuin/alarmserver for others using the FTP method

@shprota
Copy link

shprota commented Jan 3, 2023

Created PR #25 adding ability to override the passive mode public IP and port range. This allows to pass through the pre-defined range of ports when running the Docker container. Tested with my Hisilicon camera and it uploads the captured frames just fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants