tiup
tiup copied to clipboard
Improved Firewall handling
Feature Request
Is your feature request related to a problem? Please describe:
tiup cluster check --applyonly temporarily disablesfirewalld.service. It does asystemctl stop, but not asystemctl disable/systemctl mask. This leaves this as a booby trap that will explode on next reboot.- Disabling the firewall doesn't seem to be the right action. Changing the
zonefrompublictotrustedseems to be a better option. - Some high security deployments might not allow one to disable the firewall
- The docs aren't clear that a host based firewall isn't recommended, but a network based firewall around the cluster is.
Describe the feature you'd like:
- Make sure whatever
tiup cluster check --applyis done in a persistent way that survives reboots - Don't disable the firewall. Change the zone instead.
- Extend documentation for what ports need to be open, both for host based firewalls and for network based firewalls around the cluster.
- Allow one to operate with a firewall enabled.
- Create service definitions for the firewall service which then can be added to the zone.
Why the featue is needed:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
Related:
- https://github.com/pingcap/tiup/issues/1329
- https://github.com/pingcap/docs/pull/20081
- https://github.com/pingcap/tiup/blob/8e15a038a9fcd7c4562fc9839263609fb9eafe37/pkg/cluster/task/check.go#L105
- https://docs.pingcap.com/tidb/stable/best-practices-for-security-configuration#protect-internal-ports
- https://docs.pingcap.com/tidb/stable/hardware-and-software-requirements#network-requirements
- https://docs.pingcap.com/tidb/stable/best-practices-for-security-configuration#restrict-access-control