I run different services on my debian server and I would like to know if there any terminal command or something to show the countries and number connections that have established contact
The less straight forward way is to put a Middleware To query the IP with some geoIP site the get the info.
nginx+ supports geoIP blocking as well, there may be a free version of this feature