[GH-ISSUE #3] Document Hardening Items #2

Closed
opened 2026-03-03 13:58:09 +03:00 by kerem · 10 comments
Owner

Originally created by @joelchen on GitHub (Jun 25, 2017).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/3

Would be good to have a list of items and descriptions for all hardening performed in the script documented in README or Wiki.

Originally created by @joelchen on GitHub (Jun 25, 2017). Original GitHub issue: https://github.com/konstruktoid/hardening/issues/3 Would be good to have a list of items and descriptions for all hardening performed in the script documented in README or Wiki.
kerem closed this issue 2026-03-03 13:58:10 +03:00
Author
Owner

@konstruktoid commented on GitHub (Jun 26, 2017):

Thanks for the comment @joelchen, I'll work on the documentation as soon as possible.

<!-- gh-comment-id:311127641 --> @konstruktoid commented on GitHub (Jun 26, 2017): Thanks for the comment @joelchen, I'll work on the documentation as soon as possible.
Author
Owner

@konstruktoid commented on GitHub (Jul 3, 2017):

Better late than never.
@joelchen, any improvements?

<!-- gh-comment-id:312639545 --> @konstruktoid commented on GitHub (Jul 3, 2017): Better late than never. @joelchen, any improvements?
Author
Owner

@joelchen commented on GitHub (Jul 4, 2017):

@konstruktoid Yes, I see some improvements, thank you. Further improvements could be made for description or link to website of the softwares that are installed or removed, and because running this script caused my system in Docker to fail because of UFW and AppArmor, document additional steps to remedy this problem.

<!-- gh-comment-id:312775932 --> @joelchen commented on GitHub (Jul 4, 2017): @konstruktoid Yes, I see some improvements, thank you. Further improvements could be made for description or link to website of the softwares that are installed or removed, and because running this script caused my system in Docker to fail because of UFW and AppArmor, document additional steps to remedy this problem.
Author
Owner

@konstruktoid commented on GitHub (Jul 4, 2017):

@joelchen I'll add reference links.
But why would you run this in a Docker container?

<!-- gh-comment-id:312799968 --> @konstruktoid commented on GitHub (Jul 4, 2017): @joelchen I'll add reference links. But why would you run this in a Docker container?
Author
Owner

@joelchen commented on GitHub (Jul 11, 2017):

@konstruktoid I run this on Ubuntu servers, and Docker is installed on Ubuntu servers for running applications. There are problems with Docker containers when UFW and AppArmor are enabled.

<!-- gh-comment-id:314460086 --> @joelchen commented on GitHub (Jul 11, 2017): @konstruktoid I run this on Ubuntu servers, and Docker is installed on Ubuntu servers for running applications. There are problems with Docker containers when UFW and AppArmor are enabled.
Author
Owner

@konstruktoid commented on GitHub (Jul 12, 2017):

So do I @joelchen, and yes, there have been issues with Docker and UFW/AppArmor but UFW and AppArmor affects all system services and often requires modifications.

<!-- gh-comment-id:314688358 --> @konstruktoid commented on GitHub (Jul 12, 2017): So do I @joelchen, and yes, there have been issues with Docker and UFW/AppArmor but UFW and AppArmor affects all system services and often requires modifications.
Author
Owner

@pascalandy commented on GitHub (Jul 16, 2017):

Same use case as @joelchen here.

I run this on Ubuntu servers, and Docker is installed on Ubuntu servers for running applications.

I'm sure that setting up Docker with UFW & AppArmor is well documented. It would be nice to have an option like:

Do you plan to use Docker? (y/n)

If it helps, here are my Docker UFW rules

## TCP port 2376 for secure Docker client communication. This port is required for Docker Machine to work. Docker Machine is used to orchestrate Docker hosts.
ufw allow 2376/tcp

##TCP and UDP port 7946 for communication among nodes (container network discovery).
ufw allow 7946/tcp
ufw allow 7946/udp

#UDP port 4789 for overlay network traffic (container ingress networking).
ufw allow 4789/udp

##On Leader only | Will need to disable on Workers
##TCP port 2377. This port is used for communication between the nodes of a Docker Swarm or cluster. It only needs to be opened on manager nodes.
ufw allow 2377/tcp

# >>> Reload UFW
ufw reload
ufw --force enable
ufw status numbered
systemctl restart docker

EDIT: I never configured AppArmor with Docker.

<!-- gh-comment-id:315635279 --> @pascalandy commented on GitHub (Jul 16, 2017): Same use case as @joelchen here. > I run this on Ubuntu servers, and Docker is installed on Ubuntu servers for running applications. I'm sure that setting up Docker with UFW & AppArmor is well documented. It would be nice to have an option like: ``` Do you plan to use Docker? (y/n) ``` ### If it helps, here are my Docker UFW rules ``` ## TCP port 2376 for secure Docker client communication. This port is required for Docker Machine to work. Docker Machine is used to orchestrate Docker hosts. ufw allow 2376/tcp ##TCP and UDP port 7946 for communication among nodes (container network discovery). ufw allow 7946/tcp ufw allow 7946/udp #UDP port 4789 for overlay network traffic (container ingress networking). ufw allow 4789/udp ##On Leader only | Will need to disable on Workers ##TCP port 2377. This port is used for communication between the nodes of a Docker Swarm or cluster. It only needs to be opened on manager nodes. ufw allow 2377/tcp # >>> Reload UFW ufw reload ufw --force enable ufw status numbered systemctl restart docker ``` EDIT: I never configured AppArmor with Docker.
Author
Owner

@konstruktoid commented on GitHub (Aug 4, 2017):

Thanks and again sorry for the late reply, vacation and such.
I understand this tries to assist in configuring UFW and Docker but opening all above ports is unnecessary and you'll need to configure an "Docker network" in additional to the present FW_ADMIN option.

<!-- gh-comment-id:320354648 --> @konstruktoid commented on GitHub (Aug 4, 2017): Thanks and again sorry for the late reply, vacation and such. I understand this tries to assist in configuring `UFW` and `Docker` but opening all above ports is unnecessary and you'll need to configure an "Docker network" in additional to the present `FW_ADMIN` option.
Author
Owner

@konstruktoid commented on GitHub (Sep 14, 2017):

Closing, too many user specific variables.

<!-- gh-comment-id:329489448 --> @konstruktoid commented on GitHub (Sep 14, 2017): Closing, too many user specific variables.
Author
Owner

@pascalandy commented on GitHub (Sep 14, 2017):

That's why I propose a config about Docker installation y/n

But I absolutely understand that you don't want to manage this in this project.

Cheers!

<!-- gh-comment-id:329492400 --> @pascalandy commented on GitHub (Sep 14, 2017): That's why I propose a config about Docker installation y/n But I absolutely understand that you don't want to manage this in this project. Cheers!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hardening#2
No description provided.