Page 1 of 2

LAN WIFI bridge

Posted: Wed Oct 11, 2017 2:27 pm
by sky59sky59
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)

Re: LAN WIFI bridge

Posted: Wed Oct 11, 2017 3:13 pm
by WarHawk

Re: LAN WIFI bridge

Posted: Wed Oct 11, 2017 3:14 pm
by sky59sky59
WarHawk wrote:manually bridging the interfaces

https://wiki.debian.org/BridgeNetworkCo ... idge_setup
hm, but I need somehow make WIFI as access point first? or no?

Re: LAN WIFI bridge

Posted: Wed Oct 11, 2017 3:31 pm
by WarHawk
You want your DietPi to broadcast like an AP correct?

Might have to manually configure that as well
https://www.cyberciti.biz/faq/debian-ub ... ess-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

Re: LAN WIFI bridge

Posted: Fri Oct 13, 2017 7:07 pm
by sky59
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 :) 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

Re: LAN WIFI bridge

Posted: Mon Oct 16, 2017 8:49 am
by WarHawk
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/

Code: Select all

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

Code: Select all

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

Re: LAN WIFI bridge

Posted: Thu Apr 30, 2020 3:25 pm
by 8user8
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-ub ... ess-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.

Re: LAN WIFI bridge

Posted: Thu Apr 30, 2020 4:48 pm
by 8user8
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!

Re: LAN WIFI bridge

Posted: Thu Apr 30, 2020 4:48 pm
by Joulinar
looks like a similar topic like this

viewtopic.php?f=9&t=7535


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

Re: LAN WIFI bridge

Posted: Thu Apr 30, 2020 5:22 pm
by 8user8
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.