How can I restrict access to the Control Panel to a single port?
First set your web server up so the full website gets loaded from both the external ports (e.g. 80 and 443) as well as your internal port (let's say 9001).

Then open your index.php file, and add this to the top of it:

// Restrict CP access to port 9001
if (
    $_SERVER['SERVER_PORT'] != 9001 &amp;&amp; 
    isset($_GET['p']) &amp;&amp;
    preg_match('^\/*admin(\/.*)?$/', $_GET['p'])
) {
    http_response_code(403);
    echo 'You are not authorized to access this area.';
    exit();
}