Apr
24
2011
Posted by ebal at
09:14:18
in planet_ellak, planet_Sysadmin
Gateway Interface: eth0
Wireless Interface: wlan0
$ vim /etc/dnsmasq.conf
interface=wlan0
dhcp-range=192.168.1.240,192.168.1.255,3h
/etc/rc.d/dnsmasq stop
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid wireless key s:1234567890123
ifconfig wlan0 192.168.1.1 up
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/rc.d/dnsmasq start