LAN WIFI bridge

So far I only found how to make WIFI AP with DietPi, I use Orange Pi Zero

I would need to bridge WIFI and LAN for this reason:
At this moment I connect ma PC (as graphical interface) using LAN cable to OPiZ and I use remote virtual desktop. I use VNC viewer on port 5901.

I would like to avoid LAN cable and connect to it over WIFI.

How to do this? (from other small routers I know I need to bridge them so they look like the same connection)

manually bridging the interfaces

https://wiki.debian.org/BridgeNetworkConnections#Manual_bridge_setup

hm, but I need somehow make WIFI as access point first? or no?

You want your DietPi to broadcast like an AP correct?

Might have to manually configure that as well
https://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/

Never done it so…not sure how to do it
All I am doing is googling and looking for the debian type howto’s

Might be a dietpi dev answer

I installed AP from dietpi software without bridging to LAN, so they have different ip’s, 192.168.1.2 192.168.42.1.

Fortunately X11 virtual desktop is accessible on both lan and wifi :slight_smile: using VNC viewer on PC ! Great dietpi!

/i did not expect it to work like this, i thougt they must be bridged to be the same point/

So now i control my dietpi cableless from pc

I use it as a chip programmer running PonyProg on it

IPTABLES rule blocking the VNC ports on the subnet you don’t want it to be available on might be the best way to prevent it from being seen on both

Is the wifi one the 192.168.42.1/24 network?
and you want the VNC to be available ONLY on that network?

I believe the ports for VNC are 5900 and 5800

So blocking
/sbin/iptables -A OUTPUT -p tcp --dport {PORT-NUMBER-HERE} -j DROP
https://www.cyberciti.biz/faq/iptables-block-port/

sudo /sbin/iptables -A OUTPUT -p tcp --dport {5800, 5900 } -j DROP
sudo /sbin/service iptables save

should work, but someone better at IPTABLES should be able to chime in
crap no…that will block ALL VPN access…might need to block it on the device you don’t want it to go out say eth0 (or ethernet device)

/sbin/iptables -A OUTPUT -o eth1 -p tcp --dport {PORT-NUMBER-HERE} -j DROP

sudo /sbin/iptables -A OUTPUT -o eth0 -p tcp --dport {5800, 5900 } -j DROP
sudo /sbin/service iptables save

Hi,

wanna use an old Raspberry Pi 1 as a simple WIFI-AP added with some music-abilities (mpd, raspotify). Last thing is working well.

Tried configuring the WAP in bridge-mode according this: https://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/
Don’t know if I made a mistake or it’s a problem with isc-dhcp-server (HotSpot already installed), but in the end I need to clean install the dietpie, as I got no ssh connection anymore.

I think there are 2 options:

  • creating another subnet to tunnel throug with isc-dhcp-server running on raspi
  • using just one subnet and a single dhcp (my ISP-router)

Important is, that there are services in my local-lan that should be available (NAS, Octoprint)
My skills are just not enough to configure one of that, so any help would be appreciated.

Thanks in advance.

Ah, now I found RaspAP. Seems pretty much overkill for my use, but just works.

Maybe you can implement a simple bridge mode for WAP in further releases.

I like Dietpie, thanks man!

looks like a similar topic like this

https://dietpi.com/forum/t/help-wifi-hotspot-on-same-subnet-and-ssid/4023/1


UPDATE
Well, Hotspots that is provided as software in DietPi should work same way like raspap.

Seems the same…

From my point, the most easy solution (for users) would be a bridge mode as option for WAP in Dietpie.
This thing is missing in Dietpiesoftware. It always creates a separate subnet with dhcp.

Well, I guess there are more high priority task than implementing a bridge mode :wink:

However you are free to open your feature request at https://feathub.com/MichaIng/DietPi

I’m just using Diet and I like it :slight_smile:

I saw there’s already a feature request for RaspAP. To me it doesn’t matter, but a simple bridge mode for the already implemented hotspot looks more straight forward.

Here’s another attempt for bridging without using RaspAP, configuring this takes less time then ionstalling RaspAP on old Raspberry.
https://www.elektronik-kompendium.de/sites/raspberry-pi/2002161.htm
It’s written in german, but straight forward. So I think nothing more to explain.

What I changed in hostapd.conf:

  • added driver according used Wifi usb adapter (in my case “driver=nl80211”)
  • changed SSID + PW

Additionally I changed the Dietpi-Services (available via dietpi-launcher) to let the system controll the hostapd service.

Beware of, that the DHCP-Router will assign the IP to the new bridge. So after first restart, your Dietpi is available on other IP.

Advantage compared to other methods:

  • no useless stuff coming with RaspAP and after some hard poweroffs the system wasn’t available anymore (I know I shouldn’t do this)
  • no dhcp server coming with Dietpi-Hotspot

Hope this helps others, who want to bridfge Wifi <-> ethernet on raspberry / Dietpi.