<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="selinux-context-tcp-port">
      </a>
      8.7.5 SELinux TCP Port Context
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="selinux-context-mysqld-tcp-port.html">
       8.7.5.1 Setting the TCP Port Context for mysqld
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="selinux-context-mysql-feature-ports.html">
       8.7.5.2 Setting the TCP Port Context for MySQL Features
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045231564176">
  </a>
  <p>
   The instructions that follow use the
   <code class="literal">
    semanage
   </code>
   binary to manage port context; on RHEL, it's part of the
   <code class="literal">
    policycoreutils-python-utils
   </code>
   package:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa85707004"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">yum install <span class="token property">-y</span> policycoreutils-python-utils</code></pre>
  </div>
  <p>
   After installing the
   <code class="literal">
    semanage
   </code>
   binary, you can
      list ports defined with the
   <code class="literal">
    mysqld_port_t
   </code>
   context using
   <code class="literal">
    semanage
   </code>
   with the
   <code class="literal">
    port
   </code>
   option.
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa86128358"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">semanage</span> port <span class="token property">-l</span> | grep mysqld
mysqld_port_t                  tcp      1186<span class="token punctuation">,</span> 3306<span class="token punctuation">,</span> 63132-63164</code></pre>
  </div>
 </div>
 <br/>
</div>
