Hi i want to know mikrotik can save log for ip address on own device?
mean i want to know for example today my ip connect to which ip with which protocol and how many trafik recived on that connection
is that possible?
/system logging action add name=tofile target=disk disk-lines-per-file=9999 disk-file-name=mylogfile disk-file-count=1 disk-stop-on-full=yes
/system logging add topics=firewall action=tofile
/ip firewall filter add chain=forward src-address=192.168.88.0/24 protocol=tcp connection-state=new action=log
/ip firewall filter add chain=forward src-address=192.168.88.0/24 protocol=udp connection-state=new action=log
Yes it is possible.
As i understand you want to save connections log to disk file inside your mikrotik device. This is not that much recommended scenario because it may use a lot of memory and processing depending on how many connections there are. there are some limits for the created file like number of lines. Usually this logs are sent to an other server and not saved on the same mikrotik device.
But a simple setup would be like this:
1 Setup a logging action
maximum lines of log file will be 9999
only one file will be created
if file is full will stop
2. Log firewall topics to action we createdCode: Select all/system logging action add name=tofile target=disk disk-lines-per-file=9999 disk-file-name=mylogfile disk-file-count=1 disk-stop-on-full=yes
3. Setup firewall filer rules to log new tcp and udp connections. In src-address the network or ip's we want to monitorCode: Select all/system logging add topics=firewall action=tofile
Code: Select all/ip firewall filter add chain=forward src-address=192.168.88.0/24 protocol=tcp connection-state=new action=log /ip firewall filter add chain=forward src-address=192.168.88.0/24 protocol=udp connection-state=new action=log
/system logging action print
/system logging print
so how can i see the file ?file should be created automatically under mikrotik files and you shouldn't see it work on system log. probably log action has not been created successfully and and you are logging to memory instead.
see if logging action have been created by print commandand if logging rule action match with the name of the action you createdCode: Select all/system logging action print
Code: Select all/system logging print
/file print
this is my problem file does't existor if u use winbox go to files use drag and drop file to desktopCode: Select all/file print
/system logging print
here you can seei done same configuration on a mt device to test and the file showed just immediately. idk what you are missing exactly. try aalso and post it here again please.Code: Select all/system logging print