
How to configure a wifi access point on ubuntu server using netplan
This article is practical for home servers and infrastructure. It is unlikely that what is described in this article will be relevant for production.
Why would you need an access point on a server?
- This will potentially allow you to add one additional level of security by adding a range of addresses to the access point settings that will be issued to clients via dhsp. Then you can use the firewall settings to limit the use of some services only for clients with an IP address from your access point’s pool.
- You can get an additional connection channel to your home server for those cases when the main router does not work for some reason.
- Since your home server will be able to operate in a mode where it does not need intermediate devices for connection, you will be able to increase its portability. You can take your home server with you on a business trip (if it is compact), and you can operate with data on it without having a travel router with you, and without connecting it to routers in hotels.
Installing the required package
sudo apt-get install network-manager
Getting the name of a WiFi device
ls /sys/class/ieee80211/phy0/device/net/
Adding a configuration section to the netplan config
renderer: NetworkManager
wifis:
wlx90de80f97ff1: # Here you need to you your wifi device name
optional: true
dhcp4: true
addresses: [192.168.10.1/24] # DHCP ip range
access-points:
"drx3": # Wifi network name
auth:
key-management: psk
password: "testpw" # Use a stronger pw
mode: ap
band: 5GHz
networkmanager:
passthrough:
wifi-security.proto: "rsn"
Applying your new AP config
sudo netplan apply
Now you will be able to connect to your homeserver directly via wifi.