summaryrefslogtreecommitdiff
path: root/.local/bin/mikrotik-bootp-flash.sh
diff options
context:
space:
mode:
authorEvgeny Sorokin <me@ch1p.io>2024-01-06 03:41:49 +0000
committerEvgeny Sorokin <me@ch1p.io>2024-01-06 03:41:49 +0000
commit6e5d672ea04fb8c89ce9e91cf4c9a53fbb8c2f81 (patch)
treed9f9200cf572385cf25f41442231675d5eeabcb8 /.local/bin/mikrotik-bootp-flash.sh
add somethingHEADmaster
Diffstat (limited to '.local/bin/mikrotik-bootp-flash.sh')
-rwxr-xr-x.local/bin/mikrotik-bootp-flash.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/.local/bin/mikrotik-bootp-flash.sh b/.local/bin/mikrotik-bootp-flash.sh
new file mode 100755
index 0000000..48360a9
--- /dev/null
+++ b/.local/bin/mikrotik-bootp-flash.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+IFNAME=enp0s25
+
+iptables -P INPUT ACCEPT
+
+ip addr replace 192.168.1.10/24 dev $IFNAME
+ip link set dev $IFNAME up
+
+/usr/sbin/dnsmasq \
+ --no-daemon \
+ --listen-address 192.168.1.10 \
+ --bind-interfaces \
+ -p0 \
+ --dhcp-authoritative \
+ --dhcp-range=192.168.1.100,192.168.1.200 \
+ --bootp-dynamic \
+ --dhcp-boot=openwrt-23.05.2-ipq40xx-mikrotik-mikrotik_hap-ac2-initramfs-kernel.bin \
+ --log-dhcp --log-debug \
+ --enable-tftp \
+ --tftp-root=$(pwd)
+
+iptables -P INPUT DROP
+