Scripting...

HI all,

I have a Mikrotik 951G-2HnD at home doing my core networking. I play a game called Destiny on PS4 which uses a P2P system for online gaming (meaning there’s no real infra-structure and the players are connected amongst themselves).

It has become of my interest to understand what is the location of the people I’m playing against. Currently I’ve made a script that connects to the router through ssh and print the connections of UDP on port 3074. I parse the output run the IP’s against a free GeoIP database to extract the country of origin and dump it into a local sqlite database.

I was wondering if there’s an API/REST service I can use to extract those connections and cut the regex output parsing. Or even if I can have the script on the router and generate graphics there to display alongside with the normal bandwidth graphics.

Any ideas, suggestions? My main goal is just to have some metrics that can show me how many players I get from outside europe.

Well, there is the API protocol, with many clients in different languages available at the bottom.

I’m not entirely sure about tracking UDP packets though… I mean, I’d think that UDP is so “fleeting” that you’d hardly be able to take a snapshot of anyone’s IP before the packet is no longer is the list of connections.

Then again, if you can already do it with SSH, you can do it with the API protocol - the command is analogous, and most clients then allow you to extract the individual property value out of the response.