WIP
merge with initial.md
https://help.mikrotik.com/docs/
How to do some basic stuff in mikrotik.
The documentation https://wiki.mikrotik.com/wiki/Main_Page.
SSH keys
Generate a keyfile, and save it as /home/yu/.ssh/mikrotik
or not.
Copy the key. Copy only the .pub file.
Over the web interface, in files, upload, browse.
Over ftp:
%ftp 10.20.1.1
Connected to 10.20.1.1.
220 mikrotik FTP server (MikroTik 2.9.16) ready
Name (10.20.1.1:user): admin
331 Password required for admin
Password:
ftp> put mikrotik.pub
226 ASCII transfer complete
ftp> exit
Over ssh:
No, mikrotik does not support rsync.Apply the key and lock down the login and change the port. Actually I have no fucking idea what it does.
/user ssh-keys import public-key-file=mikrotik.pub
/ip ssh set always-allow-password-login=no allow-none-crypto=no strong-crypto=yes
For each new user you create you MUST give it a key or a password promp will appear.
Add the router to the ssh config file in ~/.ssh/config
. The default user is admin
Backup over ssh
backup_name="$( date +%Y.%m.%d-%H.%M )"
ssh mikrotik /system backup save name=mikrotik.$backup_name.backup
/file print ## location
scp mikrotik:/mikrotik.$backup_name.backup ~/Downloads/
Update router
/system package update set channel=long-term
/system package update check-for-updates
/system package update download ## Will ONLY download the new image
/system package update install ## Will install and reboot the router
Update firmware
Seems to be the BIOS used for recovery. Has nothing to do with the software running in normal operation.
WinBox on Linux
You may need to install mono.
Load a backup
Insert a pen in the reset hole and connect the power. Hold it there until the USR light start blinking.
Connect to some port except apparently ether1.
Set your computer to get an IP address from DHCP.
Upload the backup. By default the user admin has no password.
Connect to the router and load the backup.
Input the password and select reboot.
Wifi
If the AP is in "Detecting radars" is becuase DFS. Just skip DFS channels or wait 10 minutes.
MAC filtering
/interface wireless set wlan2 default-authentication=no
/interface wireless access-list add mac-address=00:00:00:00:00:00 interface=wlan2 \
authentication=yes forwarding=no
Limit speed
/interface wireless access-list add mac-address=00:00:00:00:00:00 interface=wlan2 \
authentication=yes forwarding=no ap-tx-limit=10485760 client-tx-limit=10485760
Get a client inside a vlan
I have not tested this.