Re: A weird routing question.
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 22:24:35 GMT
Robert Harris <robert.f.harris@xxxxxxxxxxxxxxxx> writes:
none wrote:
Hi all,
Generally speaking, in an IP network, any IP packet which reach a node
(workstation, gateway, router...), and whichever the incoming interface,
will either be caught and absorbed by this node if it is the intended
recipient, or redirected for output (IP forwarding) through [another]
interface in respect to the current routing policy.
But I have a weird goal to achieve:
On a linux box 'A' which has interfaces eth0, eth1, eth2, eth3, I would
like to do a special treatment on packets incoming via eth0 and whose
source is <some-network>.
I would like these packets be unconditionaly redirected unmodified for
output via interface eth1.
That is silly, since then they would still have exactly the same packet
headers and address that they had coming in-- ie your box A address on the
wrong network. It, all that can happen is that they get thrown away since
the address cannot be found.
You seem to be confused as to what an ip packet is ( or maybe I am). It has
a header, saying where it is going and where it came from. It has contents.
YOu are asking like-- I want all letters coming to my house to be thrown
back into the post box immediately in the same envelope they came in. In
the best circumstance they will get delived right back to you again. In the
worst they will get thrown away. In no case does this accomplish anything
useful Perhaps you should tell us what you want to accomplish and we might
be able to tell you how to do not.
That is:
- even if they were targeted (destination IP) at my box 'A', they will
be re-emitted through eth1.
And what is supposed to happen to them then?
- even if they would have been forwarded through eth2 or eth3, they
will be re-emitted through eth1 too.
No idea what this means.
You need to read "raw" packets at eth0 and write them to eth1.
Any idea to help me reach this goal?
Sincerely,
Le Testeur
"man packet" will get you started. There is also a library "libpcap"
that is used by tcpdump which you may find useful.
Robert.
- Follow-Ups:
- Re: A weird routing question.
- From: none
- Re: A weird routing question.
- References:
- A weird routing question.
- From: none
- Re: A weird routing question.
- From: Robert Harris
- A weird routing question.
- Prev by Date: Re: A weird routing question.
- Next by Date: Re: A weird routing question.
- Previous by thread: Re: A weird routing question.
- Next by thread: Re: A weird routing question.
- Index(es):
Relevant Pages
|