Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Share your Raspberry pi4b wifi through ethernet - turns your rp4b into wifi dongle for all your boards through eth0

Featured Replies

Sharing is caring. 

 

Did finally manage to get this working.   So lets make it simple clever.

 

Actually i did this on a 64bit raspian light kernel 6.1 but it must be the same on Armbian 

 

10 jan 24

 

    Sharing the Raspberry Pi's WiFi over the ethernet port

sudo apt get update && sudo apt install dnsmasq iptables iptables-persistent dhcpcd5
sudo vim /etc/dhcpcd.conf
    interface eth0
    static ip_address=192.168.4.1/24
-------
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bk
sudo nano /etc/dnsmasq.conf -
 interface=eth0

dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h

server=8.8.8.8

bogus-priv
------

sudo systemctl restart dnsmasq.service

------
sudo vim /etc/sysctl.conf
    net.ipv4.ip_forward=1
-------
sudo systemctl start dnsmasq
-------
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
-------

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
-------
sudo iptables -L -n -v
----------
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
---------
sudo vim /etc/rc.local
    iptables-restore < /etc/iptables.ipv4.nat
exit0
---------
sudo reboot
--------

Did get a perfect internet connection on odroid n2+ through eth0 - so the rpi4b is now supplying wifi for that board and providing petitboot with netbooting images through netboot_default after exit to shell.

 

 

Edited by denni_isl

  • denni_isl changed the title to Share your Raspberry pi4b wifi through ethernet - turns your rp4b into wifi dongle for all your boards through eth0
  • Author

This is in /etc/dnsmasq.conf

interface=eth0
# listen=192.168.4.1
dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h
 server=8.8.8.8
# domain-deeded
 bogus-priv

 

sudo systemctl restart dnsmasq.service

 

and sudo nmtui, edit connection, wired connection, edit ipv4 configuration,  Manual (Shared) 192.168.4.1/24, ok

 

Edited by denni_isl

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.