Skip to content

Instantly share code, notes, and snippets.

@thosmos
Created July 26, 2022 20:51
Show Gist options
  • Save thosmos/a8eec277110ce04667d06b85711e9683 to your computer and use it in GitHub Desktop.
Save thosmos/a8eec277110ce04667d06b85711e9683 to your computer and use it in GitHub Desktop.
#!/bin/bash
USER=thomas
#IFNAME=enp164s0u2
IFNAME=enp164s0u1
firewall-cmd --add-port=67/udp
#/sbin/ip addr replace 192.168.10.2/24 dev $IFNAME
#/sbin/ip link set dev $IFNAME up
/usr/sbin/dnsmasq --user=$USER \
--no-daemon \
--listen-address 192.168.10.2 \
--bind-interfaces \
-p0 \
--dhcp-authoritative \
--dhcp-range=192.168.10.90,192.168.10.199 \
--bootp-dynamic \
--dhcp-boot=$IMAGE \
--log-dhcp \
--enable-tftp \
--tftp-root=$(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment