Page 1 of 1

I want recovery the log of Mikrotik

Posted: Tue Feb 14, 2017 10:44 am
by alex72800
Hello,
I want recovery the Hour / minutes / second, the Remote IP address, the Source IP address and the mac address of the log of Mikrotik.
I need a script to do this ?

Thank you.
Alex.

Re: I want recovery the log of Mikrotik

Posted: Tue Feb 14, 2017 1:31 pm
by yogender
Hey, If you are talking about log of mikrotik such as info, admin login, dhcp, hotspot, debug, etc , just use remote logging and collect in a dedicated log syslog server. This can be configured in System->Actions and System->Logging->Rules.

Re: I want recovery the log of Mikrotik

Posted: Tue Feb 14, 2017 3:44 pm
by alex72800
Hey, Thank for your answer but i want recovery the logging log, with the Hour / minutes / second, etc...
For example, i want:
jan/10/2017 - 11:16:10 : Source 192.168.1.101 (45:C5:1B:53:40:23) (ORION) Destination 192.168.1.2
jan/10/2017 - 11:17:10 : Source 192.168.1.141 (32:C8:1A:83:12:27) (Alex) Destination 173.194.79.94
jan/10/2017 - 11:42:10 : Source 192.168.1.169 (87:D5:0B:59:42:72) (Test) Destination 192.168.1.115

Because in France the CNIL wants a logging log of the hospot.
Thank for your help.
Alex

Re: I want recovery the log of Mikrotik

Posted: Tue Feb 14, 2017 5:24 pm
by AlainCasault
Bonjour Alex,
The logs already show all that info. Are you talking about recovering old log info from a router?

Sent from my cell phone via Tapatalk. Sorry for the errors.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 10:41 am
by alex72800
Bonjour Alain,
Dans les logs de connexion ce qui m'intéresse c'est la date, l'heure avec minute et seconde, l'adresse ip source et l'adresse ip destination et l'adresse mac de la source avec le nom de l'appareil comme dans l'exemple que j'ai donné.

Dans les logs de connexion je n'arrive pas a retrouver ces informations la. J'arrive a récupérer des informations par ci par la mais pas tout d'un coup comme je le souhaite.
Le but sera de concerver tout les logs de connexion sous la forme de mon exemple dans un bloc note.

On peux le faire sous forme de script mais je ne trouve pas grand chose concernant les scripts sur Mikrotik.
Je doit récupérer les logs de connexion pour être dans les règles des lois française concernant les hostpot publique.

Merci bonne journée.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 12:11 pm
by pmc1408
Instead of log you can maybe use a RADIUS server who will do all AAA tasks. By this way you can have a database with all your Hotspot users sessions with the IP, consumed data, login & logout time ...

Philippe.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 2:50 pm
by AlainCasault
Je ne suis pas devant un routeur en ce moment mais tout ce qui arrive dans les logs a ce format. Faudrait aller dans /system/loging et voir le ou les topics qui ajouteraient des entrées lors de connexions. L'idée de radius est à explorer aussi. Nous avons des lois similaires au Canada.

Sent from my cell phone via Tapatalk. Sorry for the errors.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 3:21 pm
by alex72800
Oui les deux options vont être explorer et si quelqu'un a la troisième option du script je suis prenneur.

Merci en tout cas.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 5:40 pm
by AlainCasault
Je reviens à la charge. Pas besoin de scripts mikrotik (à moins de ne pas comprendre le besoin réel). Une des idées proposées, syslog, va remplir le besoin de ramasser les logs. De plus ce serveur est généralement linux, donc une possibilité infinie de scripting rendu là. Moins compliqué et plus de ressources (livres, sites web) pour aider.

Sent from my cell phone via Tapatalk. Sorry for the errors.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 5:41 pm
by AlainCasault
Oui, on peut scripter sur les routeurs, mais laissons les équipements remplir leurs rôles et pas ceux des autres. C'est toujours mieux :)

Sent from my cell phone via Tapatalk. Sorry for the errors.

Re: I want recovery the log of Mikrotik

Posted: Wed Feb 15, 2017 7:37 pm
by jarda
Guys. This is English only forum. Your discussion in whatever other language is not helpful to others that do not know it.

Add English translation to your posts by editing them and please do use English only further.

Take it as warning. Thank you.

Re: I want recovery the log of Mikrotik

Posted: Thu Feb 16, 2017 9:05 am
by yogender
As the conversation in english has started again!, posting a firewall filter rule that might help
/ip firewall filter
add action=log chain=forward connection-state=new dst-port=80,443 \
in-interface=lan protocol=tcp
Now log the firewall with remote syslog server,

Re: I want recovery the log of Mikrotik

Posted: Thu Feb 16, 2017 5:13 pm
by alex72800
Thank's everibody i look at it later ;)

Re: I want recovery the log of Mikrotik

Posted: Tue Feb 28, 2017 5:36 pm
by alex72800
Hello,
Your help is very good ;)
Thanck's a lot.