Configuring a wifi access point on ubuntu server with netplan
Netplan configs for ubuntu server to run a wifi access point
#Ubuntu#Linux#Homelab
This is practical for home servers and personal infrastructure. It is unlikely to be relevant for production environments.
Why would we need an access point on a server?
- We get an additional layer of security by assigning a dedicated IP range to access point clients via DHCP. We can then use firewall rules to restrict certain services to only those addresses.
- We get a backup connection channel to our home server when the main router is down for any reason.
- Our home server can operate without intermediate devices. This makes it more portable — we can take it on a business trip (if it is compact) and access our data without a travel router or hotel network.
Installing the required package
sudo apt-get install network-managerGetting 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: # Replace with 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 the new AP config
sudo netplan applyNow we can connect to our home server directly via WiFi.