You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `none`: Do nothing, maintain existing firewall rules unchanged (default)
733
+
* `zone`: Enable firewall and configure rules: trust intranet, only open specified ports to public (default)
735
734
* `off`: Turn off and disable firewall (equivalent to old version's `node_disable_firewall: true`)
736
-
* `zone`: Enable firewall and configure rules: trust intranet, only open specified ports to public
735
+
* `none`: Do not manage firewall state/rules; fully self-managed by user
737
736
738
-
Uses `firewalld` service on EL systems, `ufw` service on Debian/Ubuntu systems.
737
+
Uses `firewalld` service on EL systems, `ufw` service on Debian/Ubuntu systems. To align behavior across distros, Pigsty now defaults to `zone`: firewall enabled by default, intranet trusted, and public access limited to [`node_firewall_public_port`](#node_firewall_public_port).
739
738
740
-
If you're deploying in a completely trusted intranet environment, or using cloud provider security groups for access control, you can use the default `none` mode to keep existing firewall configuration, or set to `off` to explicitly disable the firewall.
739
+
If you need full manual firewall control (for example, relying only on cloud security groups or enterprise firewall policies), set `node_firewall_mode` to `none`. Use `off` only when you explicitly want to disable the system firewall.
741
740
742
741
Production environments with public network exposure should use `zone` mode with [`node_firewall_intranet`](#node_firewall_intranet) and [`node_firewall_public_port`](#node_firewall_public_port) for fine-grained access control. The `zone` mode will enable the firewall if not already running.
743
742
@@ -769,26 +768,25 @@ Hosts within these CIDR ranges will be treated as trusted intranet hosts with mo
Public exposed port list. Default is `[22, 80, 443, 5432]`.
771
+
Public exposed port list. Default is `[22, 80, 443]`.
773
772
774
773
This parameter defines ports exposed to public network (non-intranet CIDR). Default exposed ports include:
775
774
776
775
* `22`: SSH service port
777
776
* `80`: HTTP service port
778
777
* `443`: HTTPS service port
779
-
* `5432`: PostgreSQL database port
780
778
781
-
You can adjust this list according to actual needs. For example, if you don't need to expose the database port externally, remove `5432`:
779
+
You can adjust this list according to actual needs. For example, if you need to expose PostgreSQL to public network, explicitly add `5432`:
782
780
783
781
```yaml
784
-
node_firewall_public_port: [22, 80, 443]
782
+
node_firewall_public_port: [22, 80, 443, 5432]
785
783
```
786
784
787
785
PostgreSQL default security policy in Pigsty only allows administrators to access the database port from public networks.
788
786
If you want other users to access the database from public networks, make sure to correctly configure corresponding access permissions in PG/PGB HBA rules.
789
787
790
-
If you want to expose other service ports to public networks, you can also add them to this list.
791
-
If you want to tighten firewall rules, you can remove the 5432 database port to ensure only truly needed service ports are exposed.
788
+
If you want to expose other service ports to public networks, you can add them to this list.
789
+
Always keep the minimum-exposure principle and open only ports you really need.
792
790
793
791
Note that this parameter only takes effect when [`node_firewall_mode`](#node_firewall_mode) is set to `zone`.
0 commit comments