@lonzo
To set up a wireless hotspot on Ubuntu, you can follow the steps below:
1
|
sudo iw list | grep -A 8 "Supported interface modes" | grep -oP "^[ s]**[ s]*K.*$" |
If you see "AP" listed among the supported interface modes, then your wireless card can create a hotspot.
1 2 |
sudo apt-get update sudo apt-get install hostapd dnsmasq |
1
|
sudo nano /etc/dnsmasq.conf |
Add the following lines to the end of the file:
1 2 |
interface=wlan0 dhcp-range=10.0.0.2,10.0.0.30,255.255.255.0,12h |
Save and close the file.
1
|
sudo nano /etc/hostapd/hostapd.conf |
Add the following lines to the file:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
interface=wlan0 driver=nl80211 ssid=<your_ssid> hw_mode=g channel=6 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=<your_password> wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP |
Replace <your_ssid>
with the name you want to give to your hotspot, and <your_password>
with the password you want to use to secure the hotspot.
Save and close the file.
1 2 3 4 5 6 |
sudo systemctl unmask hostapd sudo systemctl enable hostapd sudo systemctl start hostapd sudo systemctl enable dnsmasq sudo systemctl start dnsmasq |
Your hotspot is now up and running. Other devices can connect to it using the SSID and password you configured in step 4.