Allow unsafe port on Chrome Mac version

I have to access some services like Anyconnect on SSL port 993, 3389, etc, Chrome blocked it. I gonna use Firefox instead. So now today finally I got the solution, Enjoy and relax.

Updated: Jan 16, 2020 (Added Firefox)

Tested on May 6, 2019
Mac OSX 10.14.4
Chrome: Version 74.0.3729.131 (Official Build) (64-bit)

Solution

Go to chrome://flags disable this feature “Enable Network Service” to disabled , quit Chrome.

Create a shell under your Users directory and paste this into it.

// nano unsafe-chrome.sh 
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --explicitly-allowed-ports=993,465,110,21,22,3389

// give it permission
chmod +x unsafe-chrome.sh

Done

Firefox

  1. Go in about:config
  2. Paste network.security.ports.banned.override
  3. Type 0-65535 or specific ports that you allow to access.

References:

  1. https://stackoverflow.com/questions/54732271/explicitly-allowed-ports-not-working-in-latest-google-chrome-v-72-0-3626-109
  2. https://superuser.com/questions/188006/how-to-fix-err-unsafe-port-error-on-chrome-when-browsing-to-unsafe-ports