'How can I open port with wildcard?
I am going to install kubernetes on my VPS servers. The VPS servers based on Ubuntu 18.04 server and I am using Uncomplicated Firewall.
I have to open several ports on Ubuntu server, but one of them is marked with a wildcard:
TCP Inbound 6443* Kubernetes API server All
How can I open a port with a wildcard? Would the following be correct?
sudo ufw allow 6443*
Solution 1:[1]
The wildcard *
in this case means that it could be any port that fits your needs (except, of course, ports already in use or reserved).
Any port numbers marked with
*
are overridable, so you will need to ensure any custom ports you provide are also open.
Open the port with: sudo ufw allow 6443
and you are good to go.
Also related to this question, UWF does not accept the wildcard for rules.
- You can specify one port:
ufw allow 6443
- You can specify the service:
uwf allow ftp
- You can specify a range:
ufw allow 1234:5678/tcp
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Peter Mortensen |