Jump to content

Bridging Wi-Fi to Ethernet


gounthar

Recommended Posts

Hi there,

 

with the global lockdown, I had to move my "lab" at home... and I have trouble with the infamous WAF.

So I moved almost everything in the attic, and would have loved to pull an Ethernet cable from my ISP box to the "lab" Wi-Fi router, but it's not significant other's compatible.
As strange as it may seem, the Wi-Fi signal coming from the ISP box is really strong in the attic, so I thought of redirecting the Wi-Fi to the 24 ports switch thanks to a SBC.
I don't want the SBC to act as a router, I want to use the router which is in my ISP box, so that I can still interact easily with the machines in the attic wherever I may be in the house.
I don't really know where to start. I don't want to go the full Monty and install openWRT, as I don't think I need a router, just something that bonds the Wi-Fi network to the Ethernet on a board, so that I can "feed" a switch.

 

Any idea?

Thanks a lot.

Link to comment
Share on other sites

I tried another way with arp proxy, following this tutorial, but at the end, I only get

 

Apr 24 00:04:54 localhost systemd[1]: parprouted.service: Scheduled restart job, restart counter is at 249.
Apr 24 00:04:54 localhost systemd[1]: Stopped proxy arp routing service.
Apr 24 00:04:54 localhost systemd[1]: Starting proxy arp routing service...
Apr 24 00:05:00 localhost systemd-networkd-wait-online[3263]: Event loop failed: Connection timed out
Apr 24 00:05:00 localhost systemd[1]: parprouted.service: Control process exited, code=exited, status=1/FAILURE
Apr 24 00:05:00 localhost bash[3286]: Error: any valid prefix is expected rather than "/32".
Apr 24 00:05:00 localhost systemd[1]: parprouted.service: Control process exited, code=exited, status=1/FAILURE
Apr 24 00:05:00 localhost systemd[1]: parprouted.service: Failed with result 'exit-code'.
Apr 24 00:05:00 localhost systemd[1]: Failed to start proxy arp routing service.
Apr 24 00:05:05 localhost systemd[1]: parprouted.service: Service RestartSec=5s expired, scheduling restart.
Apr 24 00:05:05 localhost systemd[1]: parprouted.service: Scheduled restart job, restart counter is at 250.
Apr 24 00:05:05 localhost systemd[1]: Stopped proxy arp routing service.
Apr 24 00:05:05 localhost systemd[1]: Starting proxy arp routing service...
Apr 24 00:05:12 localhost systemd-networkd-wait-online[3295]: Event loop failed: Connection timed out
Apr 24 00:05:12 localhost systemd[1]: parprouted.service: Control process exited, code=exited, status=1/FAILURE
Apr 24 00:05:12 localhost bash[3298]: Error: any valid prefix is expected rather than "/32".
Apr 24 00:05:12 localhost systemd[1]: parprouted.service: Control process exited, code=exited, status=1/FAILURE
Apr 24 00:05:12 localhost systemd[1]: parprouted.service: Failed with result 'exit-code'.
Apr 24 00:05:12 localhost systemd[1]: Failed to start proxy arp routing service.
Apr 24 00:05:17 localhost systemd[1]: parprouted.service: Service RestartSec=5s expired, scheduling restart.
Apr 24 00:05:17 localhost systemd[1]: parprouted.service: Scheduled restart job, restart counter is at 251.
Apr 24 00:05:17 localhost systemd[1]: Stopped proxy arp routing service.
Apr 24 00:05:17 localhost systemd[1]: Starting proxy arp routing service...

I will investigate.

Link to comment
Share on other sites

Reading further in the tutorial mentioned earlier, I changed the content of /etc/systemd/system/parprouted.service

[Unit]
Description=proxy arp routing service
Documentation=https://raspberrypi.stackexchange.com/q/88954/79866

[Service]
Type=forking
# Restart until wlan0 gained carrier
Restart=on-failure
RestartSec=5
TimeoutStartSec=30
ExecStartPre=/usr/bin/perl -e 'sleep 1 until -e "/sys/class/net/wlan0"'
ExecStartPre=/bin/echo 'parprouted: wlan0 is online'
# clone the dhcp-allocated IP to eth0 so dhcp-helper will relay for the correct subnet
ExecStartPre=/bin/bash -c '/sbin/ip addr add $(/sbin/ip -4 addr show wlan0 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+\/")32 dev eth0'
ExecStartPre=/sbin/ip link set dev eth0 up
ExecStartPre=/sbin/ip link set wlan0 promisc on

#         v minus sign
ExecStart=-/usr/sbin/parprouted eth0 wlan0

ExecStopPost=/sbin/ip link set wlan0 promisc off
ExecStopPost=/sbin/ip link set dev eth0 down
ExecStopPost=/bin/bash -c '/sbin/ip addr del $(/sbin/ip -4 addr show eth0 | /bin/grep -c1 -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev eth0'

[Install]
WantedBy=multi-user.target

And the error is gone. My PC still can't see the network, but we're progressing.

Link to comment
Share on other sites

On 3/30/2020 at 12:38 AM, gounthar said:

I don't really know where to start. I don't want to go the full Monty and install openWRT,

 

Hit the easy button and install OpenWRT ;)

 

Done and done - solves your problem.

 

Move on to other interesting things with your homelab.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines