Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-07-2017, 11:48 AM   #1
Registered: Aug 2010
Posts: 48

Rep: Reputation: 0
Question Bridging Ethernet to Wifi

Does anyone have a working procedure for routing/bridging an ethernet interface to a wifi interface?

My SBC is running Yocto Linux 4.1.15 which is using systemd (very important).
I've tried using parprouted but I haven't gotten it to work. All the google references assume you are using init instead of systemd but even trying this manually, no soap, Doc.

Basically, what I want to be able to do is connect something like an IP camera to an ethernet port on a single-board computer, then have the SBC's wifi connect to a regular wifi router and then be able to view the camera feed on a laptop.

No, I don't want to use OpenWRT to do this.
Old 08-07-2017, 12:15 PM   #2
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
On the client machine:

# ifconfig eth0 netmask mtu 1440 up
# route add default gw


# ip link set eth0 up mtu 1440
# ip addr add dev eth0
# ip route add default via dev eth0


On the bridge machine

# dhclient -4 -v eth0
(connect to the internet / router, replace the device name as needed like wlan0 for wireless or wlp1s0)

# ifconfig eth2 netmask mtu 1440 up


# ip link set eth2 up mtu 1440
# ip addr add dev eth2
(note, no route needed since the gateway of the client is the route, plus a different subnet)


# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(where eth0 is the internet facing interface)

Of course this is the double NAT route, assuming the router also NATs. Which is why there's a modification to the MTU. It helps to keep speed up by keeping packet fragmentation down. Technically you only need 40 bytes per tcp/ip header, but I do 60.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 11:24 PM
Bridging Wireless To Ethernet jrtayloriv Linux - Wireless Networking 3 12-17-2006 01:05 AM
SMP+ethernet bridging = no-no? Toshiba-Laptop Linux - Networking 0 07-01-2006 11:34 PM
Ethernet bridging pepolez Linux - Networking 3 06-12-2005 07:07 AM
ethernet bridging not working twsnnva Linux - Networking 2 01-27-2005 03:49 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration