Hope this helps:
This is what I did to create a wireless hotspot on a Raspberry Pi 3 Model B+.
This configuration does not provide IP addresses, so you need a DHCP server somewhere on your network for it to work. This is IPV4 specific and the Pi has a static address on the network. I also have a local DNS server setup elsewhere on my network, that provides information about the local private domain which is why I have a search domain entry in Netplan [yourlocaldomain.lan]. If you don't have that, then you don't need that entry but you still need to add an entry for a DNS server.
The wifi config is set for use in Australia, so you will have to edit this for another country. All the entries below that start "your"... you need to enter the data consistent with your own network. For instance, yourStaticAddressofPi could become 192.168.3.50, for instance. yournetmask would be 24 in that case.
I did an install with ubuntu-22.04-preinstalled-server-arm64+raspi.img.xz
image. Then applied all current updates i.e. sudo apt update, sudo apt upgrade, sudo reboot.
I then installed hostapd and wpa_supplicant. (sudo apt install hostapd, sudo apt install wpa_supplicant, sudo reboot).
The Hostapd config (found at /etc/hostapd/hostapd.conf):
ctrl_interface=/var/run/hostapd
###############################
# Basic Config
###############################
macaddr_acl=0
auth_algs=1
country_code=AU
require_ht=0
#ht_capab= [HT40+] [HT40-] [SHORT-GI-40] [RX-STBC1]
#ieee80211d=1
#ieee80211n=1
wmm_enabled=1
# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211
##########################
# Local configuration...
##########################
interface=wlan0
bridge=br0
hw_mode=g
channel=1
ssid=yourssid
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=yourpassphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
The netplan config (/etc/netplan/50-cloud-init.yaml) is as follows:
#persistent config
network:
version: 2
ethernets:
eth0:
dhcp4: false
dhcp6: false
wlan0:
dhcp4: false
dhcp6: false
bridges:
br0:
interfaces: [eth0,wlan0]
addresses: [yourStaticAddressofPi/yournetmask]
routes:
- to: default
via: yourdefaultgatewayaddress
mtu: 1500
nameservers:
search: [yourlocaldomain.lan]
addresses: [yourIP4addressforDNSserver]
dhcp4: no
dhcp6: no
Then I also edited sysctl.conf (/etc/sysctl.conf):
Uncomment net.ipv4.ip_forward=1
This enables IPV4 packet routing across the network adaptors.
Then added the following lines:
#Disable IP6 entirely
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6=1
Once you make all these changes and reboot the Pi should be available on the static address and the WiFi should be available for connection.
Note: The Pi 3 Model B+ takes a while to start all the services (a couple of minutes at least) so you need to be patient.