Skip to content

Wireless Access Point Manual

TiB Rkt Arimana edited this page Dec 21, 2023 · 1 revision

DNS probe URL on the internet

Following the wizard script to install hostapd and its dependencies on the machine :

scripts/start.sh optional:	[-c,--client]
    required:	<priv_interface> <priv-network-x.x.x.0/len>
		required:	<wan-network-x.x.x.0/len> <wan-interface>
		user input:	[ssid passphrase [mode] [country_code channel]
		user input:	[dns1 dns2]
		w/ wan wlan1:	[wan_ssid wan_passphrase]
		optional:	[net-range-start net-range-end]
		optional:	[priv-network-ipv6/mask-length wan-network-ipv6/mask-length]
		optional:	[dns1-ipv6 dns2-ipv6]

Here follows a sample command line of a host access point acting as a router on the local network 192.168.0.0/24 (ISP router setup). Routing Broadband Internet Connection (eth0/wlan1) via Wireless Card (wlan0): ip adresses 10.0.1.x) and open a HomeWifiNet WPA-PSK secured Wifi network, try :

scripts/start.sh wlan0 10.0.1.0/24 192.168.0.0/24 eth0 HomeWifiNet 1ApassWoRd a US 36

For instance, use channel 6 for b/g/n 2,4GHz or channel 36 for ac 5GHz. Usually set to an automatic channel selection [0] doesn't work with some wifi chipsets (see manufacturer's specifications).

If you encounter difficulties by connecting to the internet through thewifi hotspot, it's because of an incorrect DNS setup. Run the folloying command on the host machine, it should return a valid dns from your ISP, in a (docker) shell instance:

systemd-resolve --status

If you don't know the DNS IP addresses of your ISP, ask your administrator for them or try to resolve them with:

nslookup ns1.your-isp.com ns2.your-isp.com

Then add them to your home wifi network, either reset environment variable, e.g. ns1.orange.fr, ns2.orange.fr:

scripts/start.sh wlan0 10.0.1.0/24 192.168.1.0/24 eth0 HomeWifiNet OneWPAssword a FR 36 $DNS1 $DNS1 "NOT_SSID" "NOT_PASS" $DNS2_IPV6 $DNS2_IPV6```

### Fixed IP address client
Host Access Point's able to define a fixed IP for a specific host. To list the current leases in DHCP service, run dhcp-lease-list :
```dhcp-lease-list
To get manufacturer names please download http://standards.ieee.org/regauth/oui/oui.txt to /usr/local/etc/oui.txt
Reading leases from /var/lib/dhcp/dhcpd.leases
MAC                IP              hostname       valid until         manufacturer        
===============================================================================================
b8:...:f2  10.0.1.37    clientmachine   2018-07-20 13:37:49 -NA-  

You can assign a fixed IP to any host with the following script : scripts/init.d/init_dhcp_serv.sh --leases clientmachine 5 A few minutes later, clientmachine will be permanently fixed to the IP address 10.0.1.5 instead of 10.0.1.37.

Troubleshooting

  • I cannot access the internet after the script returns from reboot. Is that maybe linked to an error in the DHCPd process ?

Choose either way: if you can connect to the host machine with ssh or from host keyboard, restart the DHCP server : sudo netplan apply && sudo systemctl restart isc-dhcp-server, check status then sudo systemctl status isc-dhcp-serverfrom host machine (which runs hostapd).

  • The Wifi machines never get an IP Address on 10.233.1.x after they connected to the private Wifi network, or they have to wait for several minutes to get an answer.

Obviously the DHCP server (isc-dhcp-server) is getting a lot of DHCPREQUEST and reading leases from /var/lib/dhcp/dhcpd.leases takes some time. Remove obsolete hosts from this lease file.

Clone this wiki locally