Simple independent configuration that doesn't require a global install:

dnsmasq.conf:

no-daemon
interface=eth0
listen-address=192.168.2.1

dhcp-range=192.168.2.16,192.168.2.254
dhcp-option=option:netmask,192.168.2.255
dhcp-option=option:router,0.0.0.0
dhcp-option=option:dns-server,0.0.0.0

Other necessary commands:

sudo ifconfig eth0 192.168.2.1                                                
sudo sysctl net.ipv4.ip_forward=1                                             
sudo iptables -P FORWARD DROP                                                 
sudo iptables -A FORWARD -i eth0 -j ACCEPT                                    
sudo iptables -A FORWARD --match state --state ESTABLISHED,RELATED -j ACCEPT  
sudo iptables -t nat -A POSTROUTING --source 192.168.2.0/24 -j MASQUERADE     

Start with:

sudo dnsmasq -C dnsmasq.conf

DebianNotes/dnsmasq (last edited 2010-04-08 20:13:37 by RichardDarst)