All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Gabriel <jarod125@yahoo.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: weird iptables behaviour
Date: Fri, 16 Sep 2005 00:45:45 -0500	[thread overview]
Message-ID: <432A5C09.5000105@riverviewtech.net> (raw)
In-Reply-To: <20050915214651.76113.qmail@web60914.mail.yahoo.com>

Gabriel wrote:
> I'm connecting to an openvpn box from a remote location. I
> can access the box I'm connecting to (I'm getting ping
> replies), but nothing that's beyond it (the box serves as a
> gateway for other clients). I'm using openvpn's --dev tap0
> because i need to pass non-ip packets through the tunnel.
> On the openvpn box, FORWARD policy is DROP, so I did
> "iptables -I FORWARD -i tap0 -j ACCEPT" and thought this
> should do the trick. But I was wrong. The only solutions I
> found were either set FORWARD policy to ACCEPT (not happy
> with that) or insert an iptables rule in the FORWARD chain
> that gives access based on the MAC address. I'm probably
> going to use the latter, but I can't really understand why
> "iptables -I FORWARD -i tap0 -j ACCEPT" won't work. Isn't
> this supposed to let ALL packets (not just ip packets) pass
> through? I'm thinking that it has something to do with the
> fact that i'm using --dev tap0 (tap0 is bridged with eth1 -
> the LAN facing interface - and they form br0) which is
> layer2 but, as I said before, -i tap0 -j ACCEPT should work
> as well...

First of all you will need to have a corresponding rule:

iptables -I FORWARD -o tap0 -j ACCEPT

To allow traffic in the reverse direction too.

Did you compile your bridging support with bridge-nf support?  If you did you will need to do some more work to allow your traffic to pass through.  This is because the bridge-nf code allows IPTables to see the traffic that is passing on layer 2 as if it was on layer 3.  Thus you will probably need a rule like this:

iptables -I FORWARD -i br0 -o br0 -j ACCEPT



Grant. . . .


  reply	other threads:[~2005-09-16  5:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15 21:46 weird iptables behaviour Gabriel
2005-09-16  5:45 ` Grant Taylor [this message]
2005-09-16  6:15   ` /dev/rob0
  -- strict thread matches above, loose matches on Subject: below --
2005-09-16 18:48 Gabriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=432A5C09.5000105@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=jarod125@yahoo.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.