Hướng dẫn cài đặt Mikrotik

Chuẩn bị:

USB1: Làm boot Ventory: Ventoy (https://www.ventoy.net/en/download.html)

Ném vào trong USB các file:
– WINPE.iso

– DiskImage_1_6_WinAll_Setup.exe, MX-23.3_x64.ISO

USB2: chứa file: install-image-7.16rc4.img
Releases · elseif/MikroTikPatch (https://github.com/elseif/MikroTikPatch/releases)

– install-image-7.16rc4.img: Chạy trên máy thực bằng hdd, SSD, MMC

– chr, hoặc Mirotik.iso: Dùng cho PC được cài giả lập (VMware , virtual Machine…) (*)

Cách 1: Đơn giản nhất
Boot vào WinPE.

  • Xoá sạch hết các phân vùng SSD, HDD, mmc của máy đi
  • Cài exe trong WINPE luôn nhe

Browse /chọn Physical …và yes thôi…là nó ghi đè file cài đặt lên ổ cứng rồi. Reboot

Cách 2: Hơi nhiều bước
Bước 1:
 Boot vào MX-23.3_x64.ISO

Giải thích:

  • Nếu mà Write file image Bước 1 vào USB bằng Rufus (hay các ứng dụng Wrire boot khác) thì khi cài xong nó chạy trên USB chứ không phải chạy từ HDD. Rút USB ra là nghỉ sài nhé. 
  • Cho nên boot vào linux MX-23.3_x64.ISO để mượn sức mạnh các các lệnh Command Line của Linux để ghi đè file image lên hdd, ssd,nvme…

Bước 2: Ghi dữ liệu từ file install-image-7.16rc4.img vào HDD, SSD, NVME

Ngoài màn hình chính/ chuột phải à Open Terminal Here​ à lsblk(để xem coi tên ổ đĩa là gì ?)

VD: mmcblk0, sda, sdb

Mở USB2: Có chứa: install-image-7.16rc4.img​ à Click phải chuột vào khoảng trống à Open Terminal Here​ à sudo su​

Nếu có bị hỏi pass: demo

Copy và paste đoạn code này:

dd if=install-image-7.16rc4.img |pv|dd bs=1M of=/dev/mmcblk0 status=progress

Khởi động lại

Đây mới chỉ là ném file cài đặt vào trong ssd thôi. Giờ mới tiến hành cài từ ssd đó nè…​

Bước 3: Cài đặt
Chú ý là: Khi “cài” thiết lập Bios: Legacy (chuẩn cũ), Cài xong thì có thể boot UEFI​

+ Khi cài nhấn chữ a, rồi nhấn phím mũi tên sang phải 1 cái, sau đó, đó nhấn I

Bước 4: Down Crack về như hình (Nhớ tắt phần mềm Virus)

(https://github.com/oldmanpushcar/MikroTikPatch-mips/tree/main)

PC kết nối Mikrotik OS bằng địa chỉ mac nên không cần set IP và nó cũng không tự sinh ra IP khi chưa configuration nên không hoảng loạn bước này nhé. Mở app: winbox64 kết nối nó

Login vào Mikrotik lấy Software ID: xxx
+ Điền vào trong Keygen
+ Nhấn Generate
+ Nhấn Copy / paste nó ra Notepad để save lại, xoá đi các phần thừa…
Login vào Mik và nhấn nút Paste Key
​Hoặc ai muốn vọc phần mềm chia ổ đĩa thì dùng: gparted
Right click ngoài màn hình chính =>application => system => chọn gparted)​

UPDATING…Web Generator
MeGa-TiK VPN

 

Script bảo vệ toàn diện Router Mikrotik

# Tham khảo thêm code bảo mật ở https://rickfreyconsulting.com/basic-mikrotik-firewall-rev-5-0-free-version/
/ip service set telnet disabled=yes
/ip service set ftp disabled=yes
/ip service set www disabled=yes
/ip service set ssh disabled=yes
/ip service set api disabled=yes
/ip service set api-ssl disabled=yes
/ip firewall filter
add chain=forward dst-port=11211 protocol=udp action=drop comment="Memcrashed - Amplification Attacks UDP 11211"
/ip firewall filter
add chain=forward connection-state=new action=jump jump-target=block-ddos comment="Anti DDoS Attacks"
add chain=forward connection-state=new src-address-list=ddoser dst-address-list=ddosed action=drop
add chain=block-ddos dst-limit=50,50,src-and-dst-addresses/10s action=return
add chain=block-ddos action=add-dst-to-address-list address-list=ddosed address-list-timeout=10m
add chain=block-ddos action=add-src-to-address-list address-list=ddoser address-list-timeout=10m
/ip firewall filter
add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="Mark Source ip port scanner to Address list " disabled=no
add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP FIN Stealth scan"
add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/FIN scan"
add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/RST scan"
add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="FIN/PSH/URG scan"
add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="ALL/ALL scan"
add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP NULL scan"
add chain=input src-address-list="port scanners" action=drop comment="Drop port scanners" disabled=no
/ip firewall filter
add action=drop chain=input comment="drop ftp BRUTE FORCErs" dst-port=21 protocol=tcp src-address-list=ftp_blacklist
add action=accept chain=output content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m protocol=tcp
add action=add-dst-to-address-list address-list=ftp_blacklist address-list-timeout=3h chain=output content="530 Login incorrect" protocol=tcp
add action=drop chain=input comment="drop ssh BRUTE FORCErs" dst-port=22-23 protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input connection-state=new dst-port=22-23 protocol=tcp
add action=drop chain=forward comment="drop ssh brute downstream" dst-port=22-23 protocol=tcp src-address-list=ssh_blacklist

Script cài đặt proxy tunnel trên mikrotik với containers.

Kích hoạt Container trên Mikrotik

Lưu ý: Mikrotik Container cần Router với dung lượng NAND từ 128MB trở lên. 

  • Đảm bảo đang ở phiên bản Mikrotik OS mới nhất bằng cách vào System => Packages => Check for Update.
  • Download Extra packages theo OS Mikrotik của bạn tại đây. Giải nén và up file container vào File manager của Winbox. Sau đó chọn System => Reboot để cài đặt gói bổ sung Container vào Router Mikrotik OS 7.
  • Sau khi reboot. Tiến hành login Winbox và nhập câu lệnh sau:
/system/device-mode/update container=yes
  • Sau khi hiện dòng chữ update: please activate by turning power off or pressing reset or mode button in... thì rút nguồn router sau đó cắm lại (bắt buộc rút nguồn, không reboot)
  • Chờ router khởi động lại, vào Terminal nhập lệnh /system/device-mode/print. Màn hình hiện container: yes là được.
Script: Download