<p>I am going to install kubernetes on my VPS servers. The VPS servers based on Ubuntu 18.04 server and I am using <a href="https://en.wikipedia.org/wiki/Uncomplicated_Firewall" rel="nofollow noreferrer">Uncomplicated Firewall</a>.</p>
<p>I have to <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#check-required-ports" rel="nofollow noreferrer">open several ports</a> on Ubuntu server, but one of them is marked with a wildcard:</p>
<pre><code>TCP    Inbound    6443*    Kubernetes API server    All
</code></pre>
<p>How can I open a port with a wildcard? Would the following be correct?</p>
<pre><code>sudo ufw allow 6443*
</code></pre>

softshipper
<p>The wildcard <code>*</code> in this case means that it could be <strong>any port</strong> that fits your needs (except, of course, ports already in use or reserved).</p>
<p><a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#check-required-ports" rel="nofollow noreferrer">In documentation</a>:</p>
<blockquote>
<p>Any port numbers marked with <code>*</code> are overridable, so you will need to ensure any custom ports you provide are also open.</p>
</blockquote>
<p>Open the port with: <code>sudo ufw allow 6443</code> and you are good to go.</p>
<hr />
<p>Also related to this question, UWF <em>does not accept</em> the wildcard for rules.</p>
<ul>
<li>You can specify one port: <code>ufw allow 6443</code></li>
<li>You can specify the service: <code>uwf allow ftp</code></li>
<li>You can specify a range: <code>ufw allow 1234:5678/tcp</code></li>
</ul>
