Conifure Ad-hoc wireless router on Linux
It’s acutally quite simple-got it to work in 5 min.
Setup at the server:
- iwconfig eth1 essid <essid> mode ad-hoc
- ipconfig eth1 10.0.0.1 up
- echo “1″ > /proc/sys/net/ipv4/ip_forward
- iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Setup on a client:
- iwconfig eth1 essid <essid> mode ad-hoc
- ipconfig eth1 10.0.0.2 up
- route add default gw 10.0.0.1
- echo “nameserever 10.0.0.1″ > /etc/resolv.conf
Should work. Another thing you may try is if your network card supports a “master” mode (iwconfig <interface> mode master) and if it does, you can setup an access point. I guess the rest should be similar (use “mode managed” on a client of course).