A method including determining, by a first device in communication with a second device in a mesh network, an access policy associated with processing internet protocol (IP) packets received from the second device in the mesh network; determining, by the first device in the mesh network, that an IP packet is received from the second device over a meshnet connection between the first device and the second device; and processing, by the first device in the mesh network, the IP packet received from the second device in accordance with the access policy based at least in part on determining that the IP packet is received from the second device. Various other aspects are contemplated.