I am a beginner in Linux.
I tried to scan the open port of my computer but I found that only three ports are opened which is port 80, 53 and 65535.
Then, I tried to scan my android mobile phone. It shown that all ports are closed.
I used the following command:
nmap -sT -p- (myip)
Is it normal? Or am I doing something wrong?
It is normal that the port are closed if no service like ssh server or web server is opening them.
If you install openssh-server port 22 will be opened, if you install apache2 port 80 will be opened.
If you use ssh ( apt-get install openssh-client ) or a webbrowser it will temporary open a random high port for the duration of the usage.
Port 53 is dns. Port 80 is http, do netstat -tlpen to see which process opens which port, especially the port 80 in your case.
Since on your android phone you are not offering any services, only using them it is nornal that nmap shows no open ports.
You find the default port numbers in /etc/services
The ports 0-1023 are called well known ports, they are registered with special services: 22 ssh 23 telnet 25 smtp 80 http 143 imap 443 https and so on, see /etc/services.
This is the server side waiting for a client to connect.
The client ( telnet, webbrowser, putty ...) will use a random high port (ports are 16 bit so 0- 65k ) for example 38743, it opens the connection by sending a tcp packet with set syn flag to the server.
That packet has the sender ip and port and the destination ip and port.
The server replies with a packet with ack flag set, and uses the clients packets sender ip and port as destination.
So if your Webbrowser opens connections to 2 different webservers it uses different random high ports for each server.