summaryrefslogtreecommitdiff
path: root/.local/bin/mikrotik-bootp-flash.sh
blob: 48360a996d8b7afee94b4f18c8ef6b5271221e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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