Routing in 2 seconds

Route the network for everybody when you are the only one to have the wireless connection.

# aptitude install ipmasq dnsmasq


eth1 here is for the interface of the dhcp server. Wireless is on an other interface.

auto eth1
iface eth1 inet static


Uncomment the following line in /etc/dnsmasq

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.

(watch that the network address (192.168.0.) is the same as the eth1 one)

and restart dnsmasq

# invoke-rc.d dnsmasq restart

and that's it.


Never forget that you have ipmasq installed. If you encounter

sendmsg: Operation not permitted


# invoke-rc.d networking restart

Do not forget either that you have a dhcp server running when you connect randomly to other networks.