All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kārlis Repsons" <karlis.repsons@gmail.com>
To: 'netfilter' <netfilter@vger.kernel.org>
Subject: Re: Forward packets from one interface to another?
Date: Tue, 3 Feb 2009 19:40:09 +0000	[thread overview]
Message-ID: <200902031940.09273.Karlis.Repsons@gmail.com> (raw)
In-Reply-To: <4988992f.20038e0a.3b6a.ffffd8a6@mx.google.com>

On Tuesday 03 February 2009 19:21:05 Gilad Benjamini wrote:
> Your description is not very clear, but my guess is that you want to run a
> bridge on this PC. "man brctl" is a good place to start.
It is all very simple: think of one computer with two RJ45 inputs, one 
connected to LAN, other to laptop, which needs access to LAN too. The problem 
is: I have only one cable to LAN and no extra switch.

Is that only bridging to use? I would like to set up routing for that, because 
it seams simple enough for me (and I want to see how it can be done), but it 
turns out not so in practice today :(
So do I have to use bridge in any case here?

> Most distributions have an easy way to setup the bridge via the network
> configuration files.
>
> If you actually need to set your machine as a router that's a different
> issue.
I am interested to set it up as a small router, yes. 

>
> Regarding iptables, you will need rules on the FORWARD table to catch
> packet travelling through the bridge.
>
> > -----Original Message-----
> > From: netfilter-owner@vger.kernel.org [mailto:netfilter-
> > owner@vger.kernel.org] On Behalf Of K?rlis Repsons
> > Sent: Tuesday, February 03, 2009 9:54 AM
> > To: netfilter
> > Subject: Forward packets from one interface to another?
> >
> > Hello,
> > maybe someone here can help with this problem: I have two NIC ports
> > (for RJ45
> > I mean) on my PC (pH) and it is necessary to attach another PC (pB) to
> > the
> > spare port similarly to like it was attached to switch. pB has static
> > IPv4
> > just like pH.
> > But. I want to do it with routing and iptables! Please, please, I have
> > always
> > failed using two interfaces, I would appreciate an example of how can I
> > change it!
> > --
> > To unsubscribe from this list: send the line "unsubscribe netfilter" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2009-02-03 19:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 17:53 Forward packets from one interface to another? Kārlis Repsons
2009-02-03 19:21 ` Gilad Benjamini
2009-02-03 19:40   ` Kārlis Repsons [this message]
2009-02-03 19:49     ` Gilad Benjamini
2009-02-03 20:04       ` Kārlis Repsons
2009-02-03 20:24         ` bsilva
2009-02-03 21:37           ` Rick Jones
2009-02-03 21:48             ` bsilva
2009-02-03 22:13             ` Mike Wright
2009-02-03 22:24               ` Rick Jones
2009-02-04 11:18               ` Pascal Hambourg
2009-02-03 21:32         ` Gilad Benjamini
2009-02-03 20:45       ` Rick Jones

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=200902031940.09273.Karlis.Repsons@gmail.com \
    --to=karlis.repsons@gmail.com \
    --cc=netfilter@vger.kernel.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.