LAN WIFI bridge Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
sky59sky59
Posts: 27
Joined: Fri Jan 06, 2017 11:11 pm
Location: Ausria/Slovakia

LAN WIFI bridge

Post 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)
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: LAN WIFI bridge

Post by WarHawk »

sky59sky59
Posts: 27
Joined: Fri Jan 06, 2017 11:11 pm
Location: Ausria/Slovakia

Re: LAN WIFI bridge

Post 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?
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: LAN WIFI bridge

Post 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
sky59
Posts: 1
Joined: Wed Dec 21, 2016 6:53 pm

Re: LAN WIFI bridge

Post 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
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: LAN WIFI bridge

Post 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
8user8
Posts: 5
Joined: Thu Apr 30, 2020 3:00 pm

Re: LAN WIFI bridge

Post 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.
8user8
Posts: 5
Joined: Thu Apr 30, 2020 3:00 pm

Re: LAN WIFI bridge

Post 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!
User avatar
Joulinar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: LAN WIFI bridge

Post 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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
8user8
Posts: 5
Joined: Thu Apr 30, 2020 3:00 pm

Re: LAN WIFI bridge

Post 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.
Post Reply