#!/bin/bash

sudo iptables -t nat -A POSTROUTING -o wlp2s0 -s 192.168.2.0/24 -j MASQUERADE
sudo bash -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo kill -9 dnsmasq
sleep 1
sudo dnsmasq -d -i eno1 -I lo --dhcp-range="192.168.2.100,192.168.2.150,12h" --dhcp-option="1,255.255.255.0" --dhcp-option="3,192.168.2.1"
# -d to keep forground
