Ports on the computer and the firewall, and the goal is 101 questions

Well, computers have ports for applications to transfer data from the outside world to the firewall, and then to the computer.

Then how do Firefox and the Internet browser use the same port on the same computer?

And why we can not use port 80 to transfer all traffic from all places to the computer.

So why do we need certain ports?

+3
source share
4 answers

These are not local ports that are important at all. These are remote ports.

, , () , 80 . . - TCP/IP, , . netstat -an , -, , :

tcp        0      0 ::ffff:192.168.1.223:22     ::ffff:192.168.1.230:2369   ESTABLISHED

, 22. 2369 . ssh- - .

, , , , - 8383, . , - , . ( ).

- , 80 . IP-, -. , -. 80 IP-.

- , , 80.

65536 , , - , " " . 1023 - . ( , - , 1023).

TCP/IP-. TCP/IP .

UDP. UDP , , , , , . . - .

+4

. , () -, 80. SourceIP: SourcePort DestIP: DestPort.

, Firefox IE - ( 80), , .

netstat , .

+1

, .

80 , ...

, 1 .

0

netstat , :

C:\Temp> netstat -an

  TCP    192.168.XXX.150:1493   74.125.45.100:80       ESTABLISHED
  TCP    192.168.XXX.150:1504   69.59.196.213:80       ESTABLISHED
  TCP    192.168.XXX.150:1507   74.125.91.138:80       ESTABLISHED
  TCP    192.168.XXX.150:1510   65.55.11.162:80        ESTABLISHED
  TCP    192.168.XXX.150:1518   69.59.196.211:80       ESTABLISHED
  TCP 192.168.XXX.150: 1519 69.59.196.216:80 ESTABLISHED
  TCP 192.168.XXX.150: 3711 64.208.186.96:80 CLOSE_WAIT

Please note that the address 192.168.XXX.150is my computer address on my home network. The 4-digit numbers following the IP address are the local port that my computer uses to communicate with the port 80on many different servers.

0
source

Source: https://habr.com/ru/post/1721455/


All Articles