Fundamentals

Client-server model

Easy
15 min

Client-server model


The client-server model is an architecture in which terminals are connected to server programs. For example, when accessing a website, the browser is the client that contacts the web server, resulting in the web server returning the website to the browser. This search is carried out using either the HTTP or HTTPS protocol, but the same implementation model also applies to other protocols. Protocol refers only to the guide that specifies how the client and server communicate with each other. The protocol specifies in which format the request message should be sent and in which format the response returned by the server program must be in order for the client to interpret this response correctly and for communication to continue without disruptions.


Ports


Since one server can offer users many different server programs, such as websites, email service, remote access services, and countless other services, the client and server must have a way to distinguish these different channels from each other. For this purpose, there is a concept called ports. Ports are simply different routes through which messages can travel and are an extremely important concept for the operation of computer networks.

It is important to understand how protocols, ports, and client-server model are part of the same entity. The client-server model describes the operating model of how a client, such as a browser, requests a webpage and the server responds to this request by returning the webpage to the browser. Ports, on the other hand, are the channels through which this request can be executed, and the protocol instructs in which format this request and response should be.

Gates exercise

Practice the things taught in the module.

  • You can list open ports with the command ss -tlp
  • You can connect to a port using the command nc IP address port number
  • You are able to listen to a port with the command nc -lp port number

Exercises

Task 1

The training program listens to one port on your lab machine. Find out the port number and contact that port.

Task 2

Set the server to listen on port 4444.

hakatemia pro

Ready to become an ethical hacker?
Start today.

As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.