Appearance
ybcli: config firewall
Open or close a specific port on the system, including ports for Yellowbrick services and any custom ports. These commands operate on both manager nodes if both are available.
config firewall list
config firewall open all
config firewall open <HTTP | 80>
config firewall open <HTTPS | 443>
config firewall open DATABASE [port]
config firewall open tcp <port>
config firewall open udp <port>
config firewall close all
config firewall close all_custom
config firewall close <HTTP | 80>
config firewall close <HTTPS | 443>
config firewall close DATABASE
config firewall close tcp <port>
config firewall close udp <port>
- list
List the ports on the system that are currently open or closed, including all the custom ports that are currently open.
- open | close
Open or close a specific port, open or close all ports on the system (including custom ports), or close all custom ports only.
The default database port, if not specified in the
open
command, is5432
. The following values are alternatives for the same port:HTTP
and80
HTTPS
and443
Use the
tcp
andudp
options to open or close specific custom ports on your system. Use theall_custom
option to close all custom ports and leave the standard Yellowbrick service ports as they were.You can use custom port numbers from 1 to 65535, except for the following ports, which are reserved:
- TCP: 22, 80, 443, 2049, 5432, 8182, 9443, 11111, 11112, and 31000-41000
- UDP: 546
Examples
Close the HTTP service port:
YBCLI(25344) (PRIMARY - yb100-mgr0)> config firewall close http
Successfully closed firewall for service HTTP
Remote manager node
-------------------
Successfully closed firewall for service HTTP
Open the database service port:
YBCLI(25344) (PRIMARY - yb100-mgr0)> config firewall open database
No custom database port enabled. Using default port 5432
Successfully opened firewall for service DATABASE (5432)
Remote manager node
-------------------
No custom database port enabled. Using default port 5432
Successfully opened firewall for service DATABASE (5432)
Open a custom TCP port:
YBCLI(25344) (PRIMARY - yb100-mgr0)> config firewall open tcp 65535
Successfully opened firewall port 65535/tcp
Remote manager node
-------------------
Successfully opened firewall port 65535/tcp
Close a custom TCP port:
YBCLI(25344) (PRIMARY - yb100-mgr0)> config firewall close tcp 65535
Successfully closed firewall port 65535/tcp
Remote manager node
-------------------
Successfully closed firewall port 65535/tcp
List all open and closed ports:
YBCLI(2820) (PRIMARY - yb100-mgr0)> config firewall list
The following services are open: HTTP(80) HTTPS(443) Database(5432)
The following custom ports are open: 107/tcp 115/tcp 162/udp 631/udp
The following services are closed:
Remote manager node
-------------------
The following services are open: HTTP(80) HTTPS(443) Database(5432)
The following custom ports are open: 107/tcp 115/tcp 162/udp 631/udp
The following services are closed: