IPTABLES and EBTABLES
Bill Davidsen
davidsen at tmr.com
Sun Nov 4 05:16:55 UTC 2012
Lázaro Morales wrote:
> Hello,
>
> How can be used EBTABLES in addition to IPTABLES to forward traffic
> from an internal LAN to an external?
>
> Suppose that I have an internal LAN with private IPs, and a Gateway
> that control the traffic to the outside, and I only need forward traffic
> for certain MAC address regardless IP address.
>
>
> INTERNET --> Gateway <--- LAN
>
> I'm not sure if I have to enable the following modules in `sysctl.conf`:
> net.bridge.bridge-nf-call-iptables = 0
> net.bridge.bridge-nf-call-arptables = 0
>
> I have tried with the following configuration, but nothing happens:
>
> # ebtables -F
> # ebtables -t nat -F
> # ebtables -P INPUT ACCEPT
> # ebtables -P OUTPUT ACCEPT
> # ebtables -P FORWARD ACCEPT
> # ebtables -A FORWARD -i eth0 -o eth1 -j ACCEPT
> # ebtables -t nat -A POSTROUTING -s INTERNAL_LAN_CLIENT_MAC -o eth1 \
> -j snat --to-source MAC_OF_EXTERNAL_GATEWAY_INTERFACE
>
> Any thought will be highly appreciated.
I'm watching the answers carefully, since I have a somewhat similar problem. If
I find anything in my work which looks useful, I'll share.
--
Bill Davidsen <davidsen at tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
More information about the users
mailing list