Configuration of internal interface in /etc/network/interfaces:
auto enp0s8
iface enp0s8 inet static
address 192.168.23.1
netmask 255.255.255.
/etc/dnsmasq.conf:
interface=enp0s8
dhcp-range=192.168.23.50,192.168.23.150,12h
dhcp-option=3,192.168.23.1 # Gateway
dhcp-option=6,8.8.8.8,8.8.4.4 # DNS Servers
Enable routing and masquerading:
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
iptables -A FORWARD -i enp0s9 -j ACCEPT