Cant stand NetworkManager?¶
codetitle. Use wpa-supplicant instead
yum install wpa-supplicant
Edit your /etc/wpa_supplicant/wpa_supplicant.conf like this:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
#WPA2-personal
network={
ssid="blagblag"
psk="swpasswordsw"
proto=RSN
key_mgmt=WPA-PSK
pairwise=TKIP
priority=5
}
codetitle. save that an use this command to kick off supplicant:
wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0 -D wext
Eth Routing with iptables¶
Some poor sod can’t get their wireless to work anyway. So lets do some routing.
codetitle. Configure your wired ethernet port
ifconfig eth1 192.168.0.23 up netmask 255.255.255.0
codetitle. Start ip_forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
codetitle. Flush your iptables and add the necessary rules to postrouting chain
iptables -t nat -F
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -t nat --list
codetitle. Now the client can plug into your eth port and run:
ifconfig ethX 192.168.0.10 up netmask 255.255.255.0
route add default gw 192.168.0.23
echo "nameserver 208.67.222.222" > /etc/resolv.conf
Now any request for route out will be masqueraded by you machine on behalf of client.
Using NETCAT (nc) simply¶
The problem we needed to copy a file from one machine to another. Nothing available but NETCAT
codetitle. On the receiver:
nc -l 9100 > foo.tar.gz
codetitle. On the sender
nc 192.168.0.100 9100 < foo.tar.gz
When the sender finishes sending the receiver will end the listen.