📜 ⬆️ ⬇️

Wifi AP setup using Ubuntu as an example

This topic is a continuation of Setting up Wifi on Linux using Adhoc using the example of Ubuntu . I will not describe the configuration of the distribution of the Internet and dhcp. This is in the previous tipica. Like the last article, this one will be aimed at a newbie. Thanks to the purchase of the HTC Hero, I was forced to configure WIFI to the AP mode, because it turned out that Hero Adhoc does not support it initially. (By the way, the HTC Hero connected, but the Internet does not work, I hope in the new firmware this will be solved)
Unfortunately in my Dlink DWA-110 there is no AP, but there is a SoftAP. His then we set up.

To work, you need a kernel 2.6.30 or newer.
We will need to start the terminal and go into superuser mode with the sudo su command
Install the required packages:
sudo apt-get install binutils hostapd libnl1 wireless-tools libiw29
Make backup standard configuration
sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/hostapd-bak.conf
We learn our Wifi interface
ifconfig
There will be something like
eth0 Link encap:Ethernet
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:77068 errors:0 dropped:0 overruns:0 frame:0
TX packets:55746 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90178476 (90.1 MB) TX bytes:7529014 (7.5 MB)
Interrupt:31 Base address:0xc000

lo Link encap: (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107457 errors:0 dropped:0 overruns:0 frame:0
TX packets:107457 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32888450 (32.8 MB) TX bytes:32888450 (32.8 MB)

wlan0 Link encap:Ethernet
inet addr:10.42.43.1 Bcast:10.42.43.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6611 errors:0 dropped:0 overruns:0 frame:0
TX packets:11693 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:755281 (755.2 KB) TX bytes:13857215 (13.8 MB)

Wlan we need.
We will write our settings
sudo gedit /etc/hostapd/hostapd.conf
A gedit window will open enter
interface=wlan0
driver=nl80211
ssid=APnet
country_code=RU
hw_mode=g
channel=11

macaddr_acl=0

wpa=3
wpa_key_mgmt=WPA-PSK
wpa_passphrase=password
wpa_pairwise=TKIP CCMP

Do not forget to replace the interface, ssid and password with your own.
I have turned off encryption altogether.
sudo gedit /etc/default/hostapd
Uncomment the lines
RUN_DAEMON="yes"
DAEMON_CONF="/etc/hostapd/hostapd.conf"

Run the demon
sudo service hostapd start
All customization is complete. Now you have your own home access point.

')

Source: https://habr.com/ru/post/89420/


All Articles