Many researchers are working hard in order to improve the capabilities of P2P networks. In this way, one of the main factors slowing down the improvement and development of P2P networks is the need to guarantee a minimum level of trust between two interacting nodes. This paper presents an innovative trust model providing a solution to this problem. Our trust model, which is based on the ant colony system, is able to select the best server to interact with, in terms of being the most trustworthy, in a very high percentage. Here, the traces of pheromone left by the ants correspond to the amount of trust that a node has on its neighbors.