Advertisement
Guest User

Untitled

a guest
Feb 14th, 2022
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. wget https://download.mikrotik.com/routeros/6.48.1/chr-6.48.1.img.zip -O chr.img.zip && \
  2. gunzip -c chr.img.zip > chr.img && \
  3. mount -o loop,offset=33554944 chr.img /mnt && \
  4. ADDRESS=ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1 && \
  5. GATEWAY=ip route list | grep default | cut -d' ' -f 3 && \
  6. echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
  7. /ip route add gateway=$GATEWAY
  8. " > /mnt/rw/autorun.scr && \
  9. umount /mnt && \
  10. echo u > /proc/sysrq-trigger && \
  11. dd if=chr.img bs=1024 of=/dev/vda
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement