ou_snaaksie
Posts: 2
Joined: Fri Dec 16, 2016 7:02 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Fri Dec 16, 2016 7:03 pm

I have set this up successfuly, but how can I allow hosts in other subnets to access devices connected to eth0?

ou_snaaksie
Posts: 2
Joined: Fri Dec 16, 2016 7:02 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Fri Dec 16, 2016 7:04 pm

I have set this up successfuly, but how can I allow hosts in other subnets to access devices connected to eth0?

flatounet
Posts: 5
Joined: Tue Dec 20, 2016 10:06 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Sun Dec 25, 2016 6:52 pm

im sorry ,im a noob in linux ,

i followed your tutoriel with sucess ,but after last reboot (ip table restore )
i go to connect to wifi ,but my wifi card are not anymore for recive wifi ....
i can setup it for made hotspot but i cant connect as client to AP ...

Image
http://www.noelshack.com/2016-51-148269 ... rewifi.jpg

im trying to made somthing like you ,
i want to connect my raspberry to multiple AP to put all bandwitch to eth0

any help here ?
i have unplug my wifi key,and re plugged it but nothing change
i cant connect to wifi :(

tulayufacik
Posts: 1
Joined: Mon Feb 20, 2017 2:52 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Mon Feb 20, 2017 2:59 pm

hi
I run sudo iptables -t -nat -a POSTROUTING -o wlan0 -j MASQERADE
but I give a problem I use RPI 3 B model
iptables v1.4.21:Couldnt load target 'MASQERADE ' :No such file or directory
Whould you like to help me please ?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Mon Feb 20, 2017 5:54 pm

It isn't MASQERADE. It is MASQUERADE. It appears you forgot the 'U'.

Thaud
Posts: 7
Joined: Fri Feb 17, 2017 4:44 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Feb 21, 2017 7:53 pm

Would this work with a Raspberry Pi 1 Model B+ with lastest raspbian ?
I've been trying every tutorial on the internet for the whole day but they were from 2013/2014 and just found out your thread when i was going to make one myself to get some help.
I have a TPLINK WN722N and i want to connect the ethernet port to a routeur (TL-WR940N).

Booshotti
Posts: 3
Joined: Sun Feb 26, 2017 10:31 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Sun Feb 26, 2017 10:42 pm

Can this be done the other way around? Ethernet to Wifi Bridge

Siamak
Posts: 70
Joined: Sat May 31, 2014 1:48 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Fri Mar 03, 2017 4:02 pm

Hi Guys,

I have followed the Tutorial and it is working like a charm.

What I would like to know is this:
I have also set-up a VPN Server using one of my RasPi 3's, it is working fine since I am connected to it via my windoze, is there any way that I can connect this WiFi bridge to my VPN Server Please, so that anything connected to the WiFi bridge is via the VPN Server.

I would really appreciate any guidance.

Cheers

Siamak

grubbypandas
Posts: 1
Joined: Sat Jul 22, 2017 7:30 am

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Sat Jul 22, 2017 7:32 am

I have tried using any of these options for my B+ however I have not been successful. After much GoogleFu I have arrived at this setup that works.

https://rbnrpi.wordpress.com/project-li ... -ready-tv/

JoerassicPark
Posts: 1
Joined: Mon Jul 24, 2017 5:38 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Mon Jul 24, 2017 5:41 pm

I followed every step and my desktop connects to the pi but wont move past it. its like i hit a wall

PC -> Pi -| router

thats as far as my pings will go and my pi has internet connection.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21140
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Mon Jul 24, 2017 8:45 pm

Or you could just read the official instructions..

https://www.raspberrypi.org/documentati ... s-point.md
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Sat Sep 30, 2017 2:07 pm

jamesh wrote:
Mon Jul 24, 2017 8:45 pm
Or you could just read the official instructions..

https://www.raspberrypi.org/documentati ... s-point.md
...and it will fail with Jessie or Stretch. Read this instead:
https://github.com/SurferTim/documentat ... s-point.md

meepatme
Posts: 9
Joined: Wed Sep 27, 2017 10:40 am

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Sat Sep 30, 2017 10:28 pm

yes that guide got my pi3 to now have an apn that works with internet :-D. THen installed vpn but i cant get it to force all the internet traffic through the VPN connection. My vpn starts but my ip stays the local one

tvipi
Posts: 1
Joined: Tue Oct 10, 2017 8:13 am

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Oct 10, 2017 8:19 am

Hi and thanks for your tutorial

I got this to work a month ago. But when trying to do this again this week on a new pi - the recepy failed.
I could not use the /etc/network/interfaces file to set ip - and I was unable to do this in /etc/dhcpcd.conf and get it to work.

The version of noobs I used on my second attemt was also a newer version v2_4_4 than previously.

How I got things to work was to use rc.local to read in the saved iptables (nat) info.

Then I had to use
systemctl disable dhcpcd
systemctl enable networking.

Now I could defined both interfaces in /etc/network/interfaces.

I will try to get this to work with dhcpcd.conf at a later time. Now just glad I got it up and running somehow.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Oct 10, 2017 11:51 am

tvipi wrote: Hi and thanks for your tutorial

I got this to work a month ago. But when trying to do this again this week on a new pi - the recepy failed.
I could not use the /etc/network/interfaces file to set ip - and I was unable to do this in /etc/dhcpcd.conf and get it to work.

The version of noobs I used on my second attemt was also a newer version v2_4_4 than previously.

How I got things to work was to use rc.local to read in the saved iptables (nat) info.

Then I had to use
systemctl disable dhcpcd
systemctl enable networking.

Now I could defined both interfaces in /etc/network/interfaces.

I will try to get this to work with dhcpcd.conf at a later time. Now just glad I got it up and running somehow.
Are you using a bridge or a standalone AP? If you are using a bridge, which is what this thread covers, iptables entries are not necessary.

If you are using a bridge and attempting to set static network settings, insure you are assigning to the bridge interface (br0) in /etc/dhcpcd.conf. It will work. I've done it more than once. I have also installed a dhcp server (dnsmasq) on the bridge interface for a standalone bridge.

VitLib
Posts: 4
Joined: Tue Nov 24, 2015 4:10 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Nov 14, 2017 8:56 am

Hi, is there anything to change in this guide if I want to add a ethernet (eth0) -> wifi (wlan1) -> internet bridge to an access point wifi (wlan0) -> wifi (wlan1) setup made with hostapd?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Nov 14, 2017 12:05 pm

VitLib wrote:
Tue Nov 14, 2017 8:56 am
Hi, is there anything to change in this guide if I want to add a ethernet (eth0) -> wifi (wlan1) -> internet bridge to an access point wifi (wlan0) -> wifi (wlan1) setup made with hostapd?
All attempts I have made to bridge a wifi device except a wifi ap to ethernet has failed. I do have a NATed network setup working with two wireless devices. Would you be interested in that?

glennvanderveer
Posts: 6
Joined: Wed Nov 01, 2017 1:32 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Nov 14, 2017 1:48 pm

SurferTim wrote:
Tue Nov 14, 2017 12:05 pm
VitLib wrote:
Tue Nov 14, 2017 8:56 am
Hi, is there anything to change in this guide if I want to add a ethernet (eth0) -> wifi (wlan1) -> internet bridge to an access point wifi (wlan0) -> wifi (wlan1) setup made with hostapd?
All attempts I have made to bridge a wifi device except a wifi ap to ethernet has failed. I do have a NATed network setup working with two wireless devices. Would you be interested in that?
I would be interested in that. I have been trying to NAT/bridge a Batman mesh on wlan1 to my AP setup on wlan0 without any success...

Thanks

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Nov 14, 2017 1:59 pm

Were you successful in setting up the standalone AP on wlan0?
https://github.com/SurferTim/documentat ... s-point.md

Before you attempt this, I highly recommend using persistent interface names. Using wlan0 and wlan1 caused me real grief. The devices don't always boot up in the correct order. Sometimes the onboard wifi interface boots as wlan1.

To use mac based interface names in Stretch
Remove /etc/systemd/network/99-default.link
Replace with

Code: Select all

[Link]
NamePolicy=kernel database onboard slot path mac
MACAddressPolicy=persistent
reboot

The difference is a masquerade.

Code: Select all

sudo iptables -t nat -A POSTROUTING -o wlx<mac address> -j MASQUERADE
You must also separate the wpa_supplicant.conf files.
Open /etc/wpa_supplicant/wpa_supplicant.conf with a text editor.
Save as /etc/wpa_supplicant/wpa_supplicant-wlx<mac address>.conf
Use the mac address of the usb wifi device.
Insert your network stuff there.

glennvanderveer
Posts: 6
Joined: Wed Nov 01, 2017 1:32 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Tue Nov 14, 2017 2:53 pm

SurferTim wrote:
Tue Nov 14, 2017 1:59 pm
Were you successful in setting up the standalone AP on wlan0?

The difference is a masquerade.

Code: Select all

sudo iptables -t nat -A POSTROUTING -o wlx<mac address> -j MASQUERADE
You must also separate the wpa_supplicant.conf files.
Open /etc/wpa_supplicant/wpa_supplicant.conf with a text editor.
Save as /etc/wpa_supplicant/wpa_supplicant-wlx<mac address>.conf
Use the mac address of the usb wifi device.
Insert your network stuff there.
Yes, I did get the AP working on both PIs.

I was not using the wpa_supplicant.conf files for either the AP or the Batman mesh.

Here is what I have done already:
viewtopic.php?f=36&t=197035

I am going to try the masquerade change that you suggested and see what happens...

arajasek
Posts: 40
Joined: Fri Oct 06, 2017 2:17 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Thu Dec 28, 2017 4:35 am

I got this to work, but the IP address is generated by the pi. I want the ethernet device to connect to other devices that are connected through Wi-fi so is there a way to have it generated by the Wi-Fi?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Thu Dec 28, 2017 10:32 am

arajasek wrote: I got this to work, but the IP address is generated by the pi. I want the ethernet device to connect to other devices that are connected through Wi-fi so is there a way to have it generated by the Wi-Fi?
If you are using an eth0/wlan0 bridge, all network settings are generated by the ethernet router, not the RPi. All devices should be accessible to each other considering their firewalls allow it.

arajasek
Posts: 40
Joined: Fri Oct 06, 2017 2:17 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Thu Dec 28, 2017 7:59 pm

SurferTim wrote:
arajasek wrote: I got this to work, but the IP address is generated by the pi. I want the ethernet device to connect to other devices that are connected through Wi-fi so is there a way to have it generated by the Wi-Fi?
If you are using an eth0/wlan0 bridge, all network settings are generated by the ethernet router, not the RPi. All devices should be accessible to each other considering their firewalls allow it.
If I run arp -a on my laptop which is connected to the wi-fi, the device(A Samsung Hue Bridge) connected to Raspberry pi's ethernet doesn't show up on the list of devices, but all other devices connected to the wifi show up. So I'm assuming the ethernet device is not on the same network as the other devices connected to the Wi-fi. The Samsung Hue bridge is also not detected by my phone which is connected to the Wifi, hence in accord with the above assumption.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Thu Dec 28, 2017 8:26 pm

My desktop computer is on my ethernet side of the RPi bridge. My iPhone is connected to the wifi side of the RPi bridge. My iPhone doesn't show up on my desktop computer using arp -a until I ping it.

Using the RPi that bridges the two localnets, nothing showed up on arp -a except my router at 192.168.1.1 until I ping each device from the RPi, then they show up after the ping.

arajasek
Posts: 40
Joined: Fri Oct 06, 2017 2:17 pm

Re: How To: Wifi to Ethernet Bridge(Updated for RPi 3)

Fri Dec 29, 2017 12:05 am

SurferTim wrote:
Thu Dec 28, 2017 8:26 pm
My desktop computer is on my ethernet side of the RPi bridge. My iPhone is connected to the wifi side of the RPi bridge. My iPhone doesn't show up on my desktop computer using arp -a until I ping it.

Using the RPi that bridges the two localnets, nothing showed up on arp -a except my router at 192.168.1.1 until I ping each device from the RPi, then they show up after the ping.
I'm unable ping the ethernet device from my laptop

Return to “Networking and servers”