Community discussions

MikroTik App
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

I want recovery the log of Mikrotik

Tue Feb 14, 2017 10:44 am

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.
 
yogender
just joined
Posts: 23
Joined: Mon May 23, 2016 6:07 pm

Re: I want recovery the log of Mikrotik

Tue Feb 14, 2017 1:31 pm

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.
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

Re: I want recovery the log of Mikrotik

Tue Feb 14, 2017 3:44 pm

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
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: I want recovery the log of Mikrotik

Tue Feb 14, 2017 5:24 pm

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.
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 10:41 am

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.
 
pmc1408
just joined
Posts: 8
Joined: Fri May 13, 2016 1:17 pm

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 12:11 pm

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.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 2:50 pm

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.
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 3:21 pm

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.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 5:40 pm

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.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 5:41 pm

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.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: I want recovery the log of Mikrotik

Wed Feb 15, 2017 7:37 pm

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.
 
yogender
just joined
Posts: 23
Joined: Mon May 23, 2016 6:07 pm

Re: I want recovery the log of Mikrotik

Thu Feb 16, 2017 9:05 am

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,
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

Re: I want recovery the log of Mikrotik

Thu Feb 16, 2017 5:13 pm

Thank's everibody i look at it later ;)
 
alex72800
just joined
Topic Author
Posts: 9
Joined: Tue Feb 14, 2017 10:34 am

Re: I want recovery the log of Mikrotik

Tue Feb 28, 2017 5:36 pm

Hello,
Your help is very good ;)
Thanck's a lot.