summaryrefslogtreecommitdiff
path: root/.local/bin/mikrotik-bootp-flash.sh
diff options
context:
space:
mode:
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
+