Unblock a Blocked Port
Feb 12th, 2012
Let’s talk about network ports, their requirement in computer world and all bits and bytes related to them.
WHY DO WE REQUIRE PORTS AFTER ALL?
A port number is basically an interface through which a sender machine communicates with the application on the receiver’s machine. Every application opens a port for the other machines to communicate with the application.
Thus port numbers work like telephone extensions. Just as a business telephone switchboard can use a main phone number and assign each employee an extension number (like x100, x101, etc.), a computer has a main address and a set of port numbers to handle incoming and outgoing connections. So whenever a machine wants to exchange message with another machine it ought to do it via the application port.
BITS n Bytes of ports
A port is associated with an IP address of the host, as well as the type of protocol used for communication. Primarily transport layer protocols (such as TCP or UDP) use ports.
A port is identified for each address and a protocol by a 16-bit number, thus valid port numbers are from 0 to 65535(2^16).These port numbers are divided into three ranges:
- Well-known ports
- Registered ports
- Dynamic or private ports.
The well-known ports are those from 0 through 1023. For example:
- 20 & 21: File Transfer Protocol (FTP)
- 22: Secure Shell (SSH)
- 23: Telnet remote login service
- 25: Simple Mail Transfer Protocol (SMTP)
- 53: Domain Name System (DNS) service
- 80: Hypertext Transfer Protocol (HTTP) used in the World Wide Web
- 110: Post Office Protocol (POP3)
- 119: Network News Transfer Protocol (NNTP)
- 143: Internet Message Access Protocol (IMAP)
- 161: Simple Network Management Protocol (SNMP)
- 443: HTTP Secure (HTTPS)
The registered ports are those from 1024 through 49151 and the dynamic or private ports are from 49152 through 65535.
Unblock a blocked port:
Many times browsers block some ports to prevent attacks that exploit vulnerable services but as a developer you may be requiring those ports for development purposes. Here is a list of steps to unblock a port on a browser.
- Open Firefox and type about:config in the address bar.
- This will open up all the configuration settings for Firefox.
- Search for network.security.ports.banned.override key (using filter textbox).
- You need to create the key if it’s not present already.
- Right click anywhere in the Firefox window and select New and then String.
- Give following nameto the key : network.security.ports.banned.override
- In the value column add the port you want to unblock.
- Right click on the chrome icon.
- Go to Properties.
- There you will find a Target text field.
- The value there would be something like this, C:UsersYour_user_nameAppDataLocalGoogleChromeApplicationchrome.exe.
- Modify the above value as follows: C:UsersYour_user_nameAppDataLocalGoogleChromeApplicationchrome.exe –explicitly-allowed-ports=111,113.
In the above line 111, 113 are the ports you want to unblock.
This is how we can use the restricted ports. Do write in your queries in the comments section.