You are on page 1of 6

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

Login to Edit Ubuntu Documentation > Community Documentation > WifiDocsWirelessAccessPoint

Tabla de Contenidos

In computer networking, a wireless access point (WAP or AP) is a device that connects wireless communication devices together to form a wireless network. The WAP usually connects to a wired network, and can relay data between wireless devices and wired devices. Several WAPs can link together to form a larger network that allows "roaming". (In contrast, a network where the client devices manage themselves - without the need for any access points - becomes an ad-hoc network.) WAPs have IP addresses for configuration.

To create a working wireless linux access point.

1. Introduction 2. Purpose of this Document 3. Setting up a Wifi Adapter to support "master mode" 4. Router Setup 1. Initial 2. Setup the Network 3. Firewall 4. DHCP Server Setup 5. Finish 5. Optional Features 1. Monitoring 2. Disabling IPv6 3. Backup 4. Port Forwarding 6. References: 1. Authors 2. Other articles on the subject

To create an Access Point you need to find a wifi card/adaptor that supports master mode see: Select and install wifi adaptor that supports master mode

Tested on Ubuntu server 7.10 First off you will need a spare machine Some NICs and a lot of patience. Working knowledge of nano and the console SSH - optional but highly recommended putty - remote console WinSCP - remote file transfer Hardware configuration for this Wireless Access Point

1 de 6

16/09/2011 06:00 p.m.

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

Note: This diagram was created with inkscape. If you want to edit it download the full file network.svg from: More Actions->Attachments

Initial
Install Ubuntu Server Edition

Choose software to install:


[*] DNS server [*] OpenSSH server

Become root
Many files can only be changed with root user. To become root, enter command

Update installation

Post install software


To install DNS server and SSH Server after an ubuntu installation use the command:

Modules/Drivers
Check interface modules (drivers) are loaded correctly. Ethernet cards are usually installed automatically when ubuntu is installed. Wireless adaptors are more likely to meed a manual install. See Wifi Adapter's or Wireless TroubleShooting Guide and WiFi TroubleShooting

SSH Connection
Assuming that your ubuntu box is connected to your ADSL router/DHCP server you will need to find your IP address of your ubuntu box so you can connect with putty

On your windows machine install putty. Type in your ubuntu IP address into putty then connect. You can now cut and paste the following the commands. If you want to transfer files use WinSCP.

Setup the Network


3 interface setup eth0 is the WAN interface (gateway) eth1 is the LAN interface ath0 is the wireless card br0 is the bridged connection of ath0 and eth1 Setup bridging

2 de 6

16/09/2011 06:00 p.m.

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

Then edit the network config

Firewall
Iptables
run these commands: NOTE: ETH0 is the gateway interface.

for logging add:

The above log will also appear in /var/log/messages, /var/log/syslog, and /var/log/kern.log. save to /etc/iptables.rules

NOTE: This is a basic setup that only routes NAT packets. Please read up on firewalling to protect your machine.

Packet Forwarding
Enable packet forwarding in the Kernel

3 de 6

16/09/2011 06:00 p.m.

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

Add the following line

NOTE: Uncommenting the line "enable packet forwarding for IPv4" doesn't seem to work Diagnostic tools Immediately allow the forwarding of packets. The configuration is not preserved on reboot but sets a flag in the kernel itself.

Test the current setting of the kernel:

Note: The /proc directory is NOT on your hard drive but is present in the running kernel.

DHCP Server Setup


A basic 10 machine DHCP server. Nothin' fancy Install DHCP server:

Config the server:

NOTE: If a DNS server (bind9) hasn't been installed change "option domain-name-servers 10.1.1.1" to the IP address of the DNS Server provided by your ISP or, even better, to a public DNS server such as those offered by Google: 8.8.8.8 or 8.8.4.4. You also need to edit /etc/default/dhcp file to specify the interfaces dhcpd should listen to. By default it listens to eth0. We need to only have it listen to our local NIC {br0}

Then add br0 like so:

Finish

4 de 6

16/09/2011 06:00 p.m.

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

restart your computer.

Monitoring
Darkstat
Stats with a http server

edit the config

To see this point a browser to http://10.1.1.1:8888

Saidar
a neat little ap that shows server usage

then

Disabling IPv6
Depending on your hardware, speed improvements may be found by disabling IPv6 See WebBrowsingSlowIPv6IPv4 for instructions for disabling IPv6.

Backup
Reference = http://doc.gwos.org/index.php/Backup_restore_system

5 de 6

16/09/2011 06:00 p.m.

WifiDocs/WirelessAccessPoint - Community Ubuntu Documentation

https://help.ubuntu.com/community/WifiDocs/WirelessAccessPoint

You will then have a tar ball that is your server all wrapped up in a bundle. Store in a cool dry place.

Port Forwarding
Port forwarding (sometimes referred to as tunneling) is the act of forwarding a network port from one network node to another. This technique can allow an external user to reach a port on a private IP address (inside a LAN) from the outside via a NAT-enabled router. Modern Linux machines achieve this by adding iptables rules to the nat table: with target DNAT to the PREROUTING chain, and/or with target SNAT in the POSTROUTING chain. Port forwaring can be tricky to setup, some setup options are: iptables/ufw webmin firestarter

http://gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point http://ubuntuforums.org/showthread.php?t=376283

Authors
pedalwrench (Ubuntu Fourm) http://www.spudz.org/ Strolls (Gentoo) LeON (Gentoo) AnMaster (Gentoo) Others

Other articles on the subject


There is a similar, but more specific guide on how to setup a Ubuntu access point using MadWifi drivers and hostapd written by Robin Smidsrd available. It focuses on setting up just the wireless AP, with the necessary bridging and hostapd configuration. How to setup an Atheros-based Access Point with WPA-PSK on Ubuntu 8.04 server CategoryHardware CategoryNetworking CategoryWireless
WifiDocs/WirelessAccessPoint (ltima edicin 2011-05-16 15:20:51 efectuada por https://login.launchpad.net/+id/ByrCsdA @ ug-uyst-s-0003.student.uni-goettingen.de[134.76.61.233]:jengelh)

Parent Page Page History

6 de 6

16/09/2011 06:00 p.m.

You might also like