Skip to content

Instantly share code, notes, and snippets.

@lukateras
Last active April 19, 2019 09:09
Show Gist options
  • Save lukateras/33ae6153315dcc5d16db3cfa00be49c7 to your computer and use it in GitHub Desktop.
Save lukateras/33ae6153315dcc5d16db3cfa00be49c7 to your computer and use it in GitHub Desktop.
#!/bin/sh
# First, open Advanced Networking app and set static 192.168.1.10/24 IP address
# to the Ethernet interface you're going to use below. To activate network boot,
# hold router's reset button for 5 seconds.
if [ -z "$2" ]; then
echo "Usage: $0 <if> <fw>"
exit 1
fi
sudo dnsmasq --bootp-dynamic --interface="$1" --dhcp-authoritative \
--dhcp-boot="$2" --dhcp-range=192.168.1.100,192.168.1.200 \
--enable-tftp --log-dhcp --no-daemon --port=0 --tftp-root="$PWD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment