S
S
Slavka2014-11-29 18:32:05
linux
Slavka, 2014-11-29 18:32:05

Distributing WIFI on Linux, how to write commands manually?

in general, I know that you can install WiFi Hostapd AP, but I need to write it myself (script), where you can get information, I just write a term paper

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Evseev, 2014-11-30
@IlyaEvseev

1) install hostapd and dnsmasq packages
2) create /etc/hostapd/hostapd.conf file

interface=wlan0
driver=nl80211
ssid=Kursovik
channel=1
hw_mode=g
auth_algs=1
wpa=3
wpa_passphrase=VeryVerySecretPassword!
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

3) create the file /usr/local/sbin/start_hostapd
#!/bin/sh

sysctl net.ipv4.ip_forward=1

iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADE

/usr/sbin/dnsmasq \
--conf-file \
--no-hosts \
--bind-interfaces \
--except-interface=lo \
--clear-on-reload \
--strict-order \
--listen-address=192.168.2.1 \
--dhcp-range=192.168.2.100,192.168.2.199,60m \
--dhcp-option=option:router,192.168.2.1 \
--dhcp-lease-max=50

hostapd /etc/hostapd/hostapd.conf

4) run it and get Linux, distributing the Internet via wifi.

S
Sergey Petrikov, 2014-11-29
@RicoX

I would start by reading the WiFi performance standards
www.ieee802.org/11

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question