1

I have already setup the RPi3 for share my internet connection (from eth1 usb ethernet dongle) to my eth0 (Rpi3 internal ethernet port).

The "ASCII diagram" is this:

Internet -> Fiber Router (192.168.1.1) -> Rpi3 # eth1 (usb dongle @ 192.168.1.10) -> Rpi3 # eth0 (192.168.0.1) -> switch -> my note (192.168.0.20)

It's working and I have all iptables filter working as well.

I'm using isc-dhcp-server to make the DHCP server for eth0.

It's possible to use the built-in RPi3 Wifi to share, by wlan0 the connection as well? I thought in Rpi3 wlan0 has the static ip 192.168.0.10 and share the connection the same way, together with the eth0 in the switch. How can I accomplish this?

Thanks in advance.

  • 1
    Do you want to make wlan0 an access point? – Ingo Jul 10 at 22:43
  • If AP means lose internet in Rpi via eth1 for itself or lose internet sharing in eth0, no. I want to share the connection and maintain the 192.168.0.xxx address in same subnet. This is a AP or hotstop mode? I want to make the same OpenWRT does make to a router, but with 1 lan port (eth0), 1 wan port (eth1) and wireless (wlan0). – user105815 Jul 12 at 18:52
  • I do not understand what should be shared with wlan0 if it should not be an access point. To what shall it connect to as client? Is there anywhere a wifi hotspot in addition to the fiber router? Please address me with @Ingo, otherwise it may be that I don't see your reply. – Ingo Jul 12 at 19:07
  • @Ingo, today I'm sharing my eth1 internet with eth0 with iptables filters. But I can't share it to wlan0. I don't have any other wireless routers, want to share with RPi3 built-in wifi and continue to share to my eth0 (that connects to my switch and others pcs in network) – user105815 Jul 12 at 19:11
  • Again, where is the wlan0 interface connected to? If there is no other wifi hotspot where it can connect to, then the only useful setup is to make it an access point so other devices can connect to it by wifi and share the resources on the wired network (eth0) and also get into the internet via eth1. – Ingo Jul 12 at 19:59
0

As far as I understand you want to extend your local network with a wifi access point in addition to the wired network and all devices, no matter if they are associated to the access point or connected by wire, should have access to the internet.

This can be achieved with a bridge. The wifi interface wlan0 and the wired interface eth0 will become members of the bridge so all devices are on the same subnet. The bridge itself will route all traffic to the internet. You can setup it in two steps: first create the bridge and test it and in a second step you can setup routing between eth1 and the bridge to get the connection to the internet.

I have a suggestion using systemd-networkd. How I would setup it you can look at Configuring Raspberry pi as Router, Wifi and Ethernet Bridge.

  • Sorry the delay, I'm going to try right now! Thank you! – user105815 Jul 16 at 10:51
  • thank you ! This worked fine, but I have made changes to not use systemd. I I just made the bridge br0 with eth0 and wlan0 and put br0 with an static ip address and set eth0 and wlan0 to manual. Used hostapd to configure wlan0 ssid, keys and country and setup wlan0 as __ap with iw. Then I shared my eth1 connection from eth0 to br0 and all worked well. Thank you! – user105815 Jul 17 at 10:57

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.