mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/oci-containers: document firewall bypass
Add explanation about the security impact of the ports option. Provide a safer example. The problem is discussed in greater depth here: https://github.com/NixOS/nixpkgs/issues/111852
This commit is contained in:
parent
9def6d0121
commit
c5c92feff7
1 changed files with 6 additions and 1 deletions
|
@ -148,12 +148,17 @@ let
|
||||||
somewhere within the specified `hostPort` range.
|
somewhere within the specified `hostPort` range.
|
||||||
Example: `1234-1236:1234/tcp`
|
Example: `1234-1236:1234/tcp`
|
||||||
|
|
||||||
|
Publishing a port bypasses the NixOS firewall. If the port is not
|
||||||
|
supposed to be shared on the network, make sure to publish the
|
||||||
|
port to localhost.
|
||||||
|
Example: `127.0.0.1:1234:1234`
|
||||||
|
|
||||||
Refer to the
|
Refer to the
|
||||||
[Docker engine documentation](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) for full details.
|
[Docker engine documentation](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) for full details.
|
||||||
'';
|
'';
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[
|
[
|
||||||
"8080:9000"
|
"127.0.0.1:8080:9000"
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue