0

I managed to set up hostapd using wifi-ap via Snap so my Raspberry Pi 4 creates a new Wifi Network Ubuntu that I can connect to. When I log in to that Raspberry via SSH using the new network, I can successfully do so, and when I ping a server on the internet from within the RPI, it can reach that server.

But when I connect to the Wifi that the Pi creates from my laptop, I don't have any access to the internet.

What am I missing to "bridge" the two interfaces so I can use the Raspberry Pi as a normal access point Wifi > Ethernet?

My /etc/netplan/50-cloud-init.yaml

network:
        version: 2
        renderer: networkd
        ethernets:
                eth0:
                        dhcp4: true
                        dhcp6: true

my /var/snap/wifi-ap/361/hostapd.conf

interface=wlan0
driver=nl80211
channel=6
macaddr_acl=0
ignore_broadcast_ssid=0
ieee80211n=1
ssid=Ubuntu
auth_algs=1
utf8_ssid=1
hw_mode=g
# DTIM 3 is a good tradeoff between powersave and latency
dtim_period=3

# The wmm_* options are needed to enable AMPDU
# and get decent 802.11n throughput
# UAPSD is for stations powersave
uapsd_advertisement_enabled=1
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
# Regulatory domain options
# Country code set to global
country_code=XX
# End reg domain options
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=*****************
wpa_pairwise=TKIP
rsn_pairwise=CCMP

my netconfig output

ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:c4:76:07:d8  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.104  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::dea6:32ff:fe0d:47b2  prefixlen 64  scopeid 0x20<link>
        inet6 fd29:d2c5:be9d::d60  prefixlen 128  scopeid 0x0<global>
        inet6 fd29:d2c5:be9d:0:dea6:32ff:fe0d:47b2  prefixlen 64  scopeid 0x0<global>
        ether dc:a6:32:0d:47:b2  txqueuelen 1000  (Ethernet)
        RX packets 9251  bytes 3761308 (3.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7765  bytes 1113458 (1.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 23558  bytes 3709615 (3.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23558  bytes 3709615 (3.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.60.1  netmask 255.255.255.0  broadcast 0.0.0.0
        ether dc:a6:32:0d:47:b3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 102  bytes 82620 (82.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

1 Answer 1

0

It seems I've found the answer!

Just unmask:

systemctl unmask hostapd

then

systemctl enable hostapd

And restart.

I hope it works for you, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.