I’m trying to detect untrusted fake Mikrotik router (installed by hacker on virtual machine) in my wlan & kick it out
here is my simple script (noOBy one)
:global int ;
:foreach int in=[/ip neighbor find] do={
:if ( [/ip neighbor get $int value-name=identity ] = "MikroTik" ) do={
:log info "Hacker!"
/ip neighbor get $int value-name=mac-address
/interface wireless access-list add mac-address=$int mac-address
} else={:log info "CleaN!"}
}
I got error when trying to add detected mac address to acces list
interrupted
invalid value of mac-address, mac address required
Now i’m trying to detect fake mikrotik by “board name” value
if “board” value null ofcourse it’s fake because it’s a virtual machine based
so i tried this :
################################
# # Fake MikroTik Killer #
# # BY: lnuxxunl #
# # Thank you jcem For support #
################################
:local int;
:local machack;
:foreach int in=[/ip neighbor find] do={
:if ([/ip neighbor get $int value-name=board] = "" ) do={
:log warning "Fake MikroTik Server Detected!";
:local machack [/ip neighbor get $int value-name=mac-address];
:log info "adding Fake Server to access list!";
/interface wireless access-list add mac-address=$machack authentication=no forwarding=no;
:log info "Fake Server Kicked Out!";
} else={:log info "CleaN!"}
}
But the script couldn’t understand the null value so it give
log message CleaN!
whats wrong with this script…whenever i use this script i was unable to load balance…only one only WAN work at a time.However failover is working fine but both of the WANs donot work together…any help?helpful answer will be appreciated
/ip address
add address=10.10.0.1/24 network=10.10.0.0 broadcast=10.10.0.255 interface=Local
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2
What has this to do with detecting a fake virtual Mikrotik? You should not ‘hijack’ an existing post thread that is nothing to do with your problem. Please create a completely new forum post.