I will try to describe how to make own home wireless access point based on RedHat linux machine.
This post include 2 part. In first one I’ll describe step which should be taken on linux machine and in second one step for windows client.
Linux(server side)
We use this host to share internet connection between users over wireless network, so the machine has to have at least two connection:
- Internet ( regular ethernet connection)
- Wireless connection( provided by wi-fi card)
I will skip how to setup your Internet connection, therefore make sure its work properly.
If you mounted your wi-fi card to pci slot use lspci to check it out:
[root@localhost ~]# lspci | grep -i wireless 02:01.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)
For this card kernel module ath5k should be loaded into the kernel. Check it:
lsmod | grep ath5k
Use modprobe unless module is not loaded.
modprobe ath5k
If you done it without any problem I will able to set up the wi-fi card. Here is network configuration file for interface wlan0 with some comments:
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0# Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter DEVICE=wlan0 ONBOOT=yes IPADDR=192.168.0.1 NETMASK=255.255.255.0 HWADDR=00:17:9a:b7:d6:01 TYPE=Wireless MODE=Ad-Hoc # set this mode if want to make this card as access point ESSID=homeee # the name of this connection which will be displayed for users KEY=dffb9e2cc2 # secret key for connection
To generate connection key run:
dd if=/dev/random bs=1 count=5| xxd -ps
Now restart the network service:
service network restart
and verify:
iwconfig wlan0
and
ifconfig wlan0
So 50% of linux part is done. Tune your kernel to make it forward ip traffic:
vi /etc/sysctl.conf
and set
net.ipv4.ip_forward
to 1:
net.ipv4.ip_forward = 1
Make changes affected:
sysctl -p /etc/sysctl.conf
Verify:
sysctl -a | grep all.forwarding | grep ipv4
And last but very important step. Its firewall and nat settings:
!!! Be careful because this command flush all your rules in OUTPUT chain
iptables -F OUTPUT
turn masquerading on:
iptables -t nat -I POSTROUTING -s 192.168.0.2/32 -o eth0 -j MASQUERADE
where eth0 your interface for share.
save it all:
service iptables save
The linux router is ready on all 100%.
Windows(client side)
I use windows Vista for this, but this steps can be used to Windows XP as well. Go to:
Start->Control Panel->Network and Internet-> Network and Sharing center -> manage network connections
Click right button on your Wireless Network Connection and choose Properties.
Make double click on Internet Protocol Version 4.
When new window is appear fill it up:
Ip address: 192.168.0.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
Also you need to specify you DNS server. Put the ip address of DNS server provided by your ISP.
Would you mind telling me where you got your theme from? Really easy on the eyes, haha. Regards, Janene Julen,