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

Warn users of postgress exposure and ufw override #947

Closed
Staking7pc opened this issue Apr 28, 2022 · 5 comments
Closed

Warn users of postgress exposure and ufw override #947

Staking7pc opened this issue Apr 28, 2022 · 5 comments
Assignees

Comments

@Staking7pc
Copy link

Staking7pc commented Apr 28, 2022

This is more of a suggestion than an issue

Below points can be added in the documentation as a warning.

1 - Warn the users to change the password in postgress and port /do not keep the default password for the same in docker-compose
2 - Firewall rules are bypassed by docker containers by default so add these commands or a note to notify users
To disable one can set

{
     "iptables": false
}

in /etc/docker/daemon.json
echo "DOCKER_OPTS=\"--iptables=false\"" >> /etc/default/docker
restart docker service

service docker restart

@jim-counter
Copy link

jim-counter commented Apr 28, 2022

Just a word of warning. Turning off IP tables in Docker caused my deployment containers to lose connectivity.

@jim-counter
Copy link

This solution appears to be working for me. It stops the ports Docker containers are binding to from being publicly available and allows me to expose just what I need using UFW To Fix The Docker and UFW Security Flaw Without Disabling Iptables.

@erc30
Copy link

erc30 commented May 3, 2022

Instead of using the ports directive, it would be better to use expose in docker-compose.yml. The postgres port will be accessible from the docker network and not from the host.

@yasiryagi
Copy link

@seandotau
Copy link
Contributor

Added to FAQ @ianhe8x

@ianhe8x ianhe8x closed this as completed Jun 13, 2022
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

7 participants