Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm getting this error when connecting to a web server on port 6666 (http://myserver:6666/):

Error 312 (net::ERR_UNSAFE_PORT): Unknown error.

Is there an easy way to resolve this without rebuilding Chrome from source?

share|improve this question

3 Answers 3

up vote 30 down vote accepted

Right Click on Chrome shortcut >> Properties >>

Then Append --explicitly-allowed-ports=xxx to shortcut target

Example:

C:\Documents and Settings\User\Local Settings\Application Data\Google\Chrome\Application\chrome.exe --explicitly-allowed-ports=6666

Resource from here

share|improve this answer
1  
I missed this answer, thanks. I opened a separate question to understand which ports are safe/blocked by default: superuser.com/questions/188058/… –  ripper234 Sep 13 '10 at 12:36
1  
This answer is excellent... for Windows. It won't solve the problem for (for example) Mac. –  Chris R May 3 '12 at 17:23
    
@ChrisR: Why? Does the --explicitly-allowed-ports switch not exist for Mac? –  Dennis May 3 '12 at 17:35
1  
Adding command line flags on the mac is a pain in the ass; if you add them to the app bundle they often get nuked in upgrades. –  Chris R May 3 '12 at 17:39
    
@ChrisR: You should consider adding this to your question. –  Dennis May 3 '12 at 17:44

You may be able to turn this off in Google Chrome, but you do so at your own risk. There is actually a good security reason why Chrome blocks these ports: Basically you open your browser up to being an open proxy for attackers to use to attack other services on your network.

For more information: Why does Chrome consider some ports unsafe?

share|improve this answer
    
@JanHudec You are correct. –  Case Jul 29 at 20:36

As subanki said, you've got to add the -explicitly-allowed-ports option to your Chrome startup command.

In Ubuntu you can do this (as root) by editing the "google-chrome" script under your Chrome installation folder

You can get the directory by typing:

ls -la /usr/bin | grep chrome

Then, edit the "google-chrome" file adding the mentioned switch to the EXEC line:

exec -a "$0" "$HERE/chrome" "-explicitly-allowed-ports=6000" "$@"

Just change "6000" with the comma separated values you might need (example: -explicitly-allowed-ports=5000,6000,7000)

NOTE: for UNIX, the switch does NOT start with "--", it does with a single "-"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.