2

I've already set up my RPi 4 as a hotspot using dnsmasq and hostapd, using a USB 4G modem to connect to the internet. This is working as expected, I'm able to connect other devices to it and get network and internet access.

What I am trying to do is also share the USB internet through the ethernet port, so that I can hook up a RPi 3+ that way (WiFi on this board doesn't appear to work), both while being on the same network, ideally.

Is this possible?

1
  • Tell us how you configure a hotspot using dnsmasq and hostapd. || Has the connected 4G USB device made a new interface on ifconfig?
    – M. Rostami
    Jan 21, 2020 at 1:21

1 Answer 1

1

It is possible to forward traffic from the wired interface (eth0?) to the usb0 interface. Because you do not have provided any details about your network configuration I can only guess. You have to enable ip forwarding. There are several ways to do it: within /etc/sysctl.conf or by systemd-networkd or with /proc/sys/net/ipv4/ip_forward. Because you have already a working access point with uplink to your 4G modem, ip forwarding should already be enabled. Check if cat /proc/sys/net/ipv4/ip_forward returns 1. If so the wired connection could already work. Just try it.

If you are using a bridge instead of routing with enabled ip forwarding then you have to add the wired interface as additional slave to the bridge.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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