Mit folgenden Befehlen kann ich auf dem Arch-Rechner das Ad-hoc Netzwerk aufstellen:
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel 4
iwconfig wlan0 essid 'name'
ifconfig wlan0 up
ifconfig wlan0 192.168.2.1
Der Windows-Rechner kann darauf connecten, IP z.B. 192.168.2.2, Gateway 192.168.2.1, DNS 8.8.8.8 noch einstellen.
Für das Internetsharing braucht man nun noch iptables um den Traffic auf den Windows-Rechner weiterzuleiten, hier Auszug einer Anleitung aus dem Netz:
#####
Now to share the internet over wireless,
sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
where ppp0 is the connection you want to share (PPPoE connection in this case)
You also need to enable IP forwarding:
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
Or, to enable permanently add the following line to /etc/sysctl.conf
net.ipv4.ip_forward=1
Some ISPs might limit the TTL so that you wont be able to share the internet. Fix:
sudo iptables -t mangle -A PREROUTING -j TTL --ttl-inc 1