What you wish to accomplish can be done, but it does require some work.
Let me first clarify that this has nothing to do with iptables
or ebtables
. You should think of NICs (including bridges) as windows: they open on the outside, not on the inside. Thus both eth0
and br0
send packets away from their outer side, i.e. on the ethernet cable, and receive packets from the same direction. Thus you cannot coax br0
into sending packets toward the interior of your server, nor eth0
to accept packets coming from inside the server.
What you can do is the following:
create a tap0
interface, and bridge your wifi interface with it, not with eth1
; this implies that you will also have to setup a DHCP server listening on the new bridge, let's call it br-new
;
setup eth1
exactly like you used to setup br0
;
route all traffic from br-new
to eth1; you do this by means of policy-routing
, sometimes also called source-routing
. This requires a second routing table, where the configuration for eth1
resides, including a default gateway. It is actually trivial to do it, just read here.
When you setup your DHCP server for the wireless network, make sure your brand new interface br-new
is associated with the name Server
.
For instance, if you are using dnsmasq
as a DHCP server, the following line will do:
dhcp-host=4C:E6:76:C4:54:24,Server,192.168.73.1,12h
This assigns to an interface with MAC address 4C:E6:76:C4:54:24 the name Server
, and the static IP address 192.168.73.1, for a lease lasting 12 hours. If you are using Debian or one of its derivatives, this means that you can define the br-new
interface in the file /etc/networking/interfaces
, but its type is neither dhcp nor static, but manual
, because this will allow dnsmasq to give it an ip address.
This is all. If you have never done it, it will definitely take you some time to implement it. If I were in your shoes, I would keep my current configuration.
ip route show
, assuming you only have one routing table, right? No source-routing.. I mean.default via 192.168.178.1 dev eth0 *break line* 192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.59