Mint 18.3, hostapd, USB WiFi Adapter, Success

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
GHammer

Mint 18.3, hostapd, USB WiFi Adapter, Success

Post by GHammer »

I had a need for a WiFi access point in order to run a device.
So, I bought an RT5370 based WiFi adapter and began.

Well, it seems that there are ALL sorts of erroneous information out there on just how to go about setting this up. Some outdated, some ill-informed, some just flat wrong.

Here is what works to have an access point that starts and works when the Mint machine is started.

sudo xed /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
sudo update-grub
sudo reboot

sudo apt-get install hostapd

iw reg get
sudo iw reg set US

sudo xed /etc/hostapd/hostapd.conf

interface=wlan1
country_code=US
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MiSSID
hw_mode=g
channel=11
beacon_int=100
dtim_period=2
max_num_sta=50
rts_threshold=2347
fragm_threshold=2346
wmm_enabled=1
ap_isolate=1
ieee80211n=1
ht_capab=[SHORT-GI-20][SHORT-GI-40]
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ieee8021x=0
eap_server=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=HappyPW2u
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=86400

sudo xed /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

[keyfile]
unmanaged-devices=mac:e8:4e:06:51:00:5d

sudo xed /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

auto wlan1
iface wlan1 inet static
address 10.0.0.1
netmask 255.255.255.0

sudo apt-get install dnsmasq
sudo xed /etc/dnsmasq.conf
interface=wlan1
dhcp-range=10.0.0.2,10.0.0.10,255.255.255.0,12h
no-hosts
addn-hosts=/etc/hosts.dnsmasq

sudo xed /lib/systemd/system/dnsmasq.service
After=network-online.target
Wants=network-online.target

sudo xed /etc/hosts.dnsmasq
10.0.0.1 WiAP

sudo xed /etc/sysctl.conf
net.ipv4.ip_forward=1

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan1 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan1 -o eth0 -j ACCEPT
sudo iptables -nvL
sudo apt-get install iptables-persistent
sudo bash -c "iptables-save > /etc/iptables.rules"

sudo xed /etc/init.d/hostapd
DAEMON_CONF=/etc/hostapd/hostapd.conf


sudo service hostapd start
sudo service dnsmasq start

sudo service hostapd status
sudo service dnsmasq status
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
kukamuumuka

Re: Mint 1.3, hostapd, USB WiFi Adapter, Success

Post by kukamuumuka »

Mint 1.3 is unknown and Mint 13 is obsolete, so time to upgrade. :wink:
https://www.linuxmint.com/download_all.php
GHammer

Re: Mint 1.3, hostapd, USB WiFi Adapter, Success

Post by GHammer »

administrollaattori wrote: Fri Jun 15, 2018 4:38 pm Mint 1.3 is unknown and Mint 13 is obsolete, so time to upgrade. :wink:
https://www.linuxmint.com/download_all.php
Actual info on how to do this is unknown.
'8' inserted.
kukamuumuka

Re: Mint 1.3, hostapd, USB WiFi Adapter, Success

Post by kukamuumuka »

GHammer wrote: Fri Jun 15, 2018 4:43 pm
administrollaattori wrote: Fri Jun 15, 2018 4:38 pm Mint 1.3 is unknown and Mint 13 is obsolete, so time to upgrade. :wink:
https://www.linuxmint.com/download_all.php
Actual info on how to do this is unknown.
'8' inserted.
18.3 looks better than 1.3 .. :lol:
GHammer

Re: Mint 18.3, hostapd, USB WiFi Adapter, Success

Post by GHammer »

Indeed it does!
Locked

Return to “Networking”