# ebtables-save

## mariourk

I've been playing with ebtables, to protect my ethernet-bridge/VPN-connection. When I try ebtables-save

```

ebtables-save > name-of-saved-file

```

The file is empty. It only shows:

```

# Generated by ebtables-save v1.0 on Thu May  8 14:49:35 CEST 2008

```

As you see, no rules. But there are some rules, I can see that with

```

ebtables -L

```

That gives:

```

Bridge table: filter

Bridge chain: INPUT, entries: 0, policy: ACCEPT

Bridge chain: FORWARD, entries: 4, policy: ACCEPT

-p IPv4 -s ff:ff:ff:ff:ff:ff --ip-dst 000.111.222.333 -j DROP 

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

```

Why doesn't ebtables-save work? I'm used to work the same way with iptables.

----------

## Squinky86

Something seems wrong. Try this command:

```
grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//
```

Ebtables-save goes through each of those tables returned by that command and runs the following on them:

```
ebtables -t $table_name -L
```

Please let us know if that first command returns anything for you.[/code]

----------

## mariourk

The first command gives nothing. I also tried to cast the output (if any) into a file, but this still gave nothing.

The second command shows all the rules of the given filter

```

router ~ # ebtables -t filter -L

Bridge table: filter

Bridge chain: INPUT, entries: 1, policy: ACCEPT

-p IPv4 --ip-src 192.168.1.14 -j ACCEPT 

Bridge chain: FORWARD, entries: 0, policy: ACCEPT

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

```

----------

## Squinky86

If you know that "filter" is the only table you'll be using, change the following line in /sbin/ebtables-save

```
@table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`);
```

to:

```
@table_names = 'filter'
```

or something like that. I'm not very good with python, so I may be way off on that.

----------

