* Outgoing interface selection by source address
@ 2003-11-27 13:51 Pawel Hadam
2003-11-27 15:20 ` Henrik Nordstrom
0 siblings, 1 reply; 10+ messages in thread
From: Pawel Hadam @ 2003-11-27 13:51 UTC (permalink / raw)
To: netfilter-devel
Hi all
I have 2 local interfaces (eth0 & eth1) and thus 2 IPv6 addresses (src0 &
src1).
I have an SCTP/IPv6 application that binds to one of the addresses
(let's say src0) and sends packets to some destination (dst). But
according to the classical routing policy, all packets in this
connection (src0, dst) are routed via eth1. And I would like them to be
routed via interface eth0, as src0 is the address of eth0 not eth1.
Is it possible to do it with netfilter for IPv6 ? I mean, is it possible
to route the packets via the proper outgoing interface by theirs source
address, like this:
if (src = src0) then send via eth0
if (src = src1) then send via eth1
if (src = other) do whatever
Could anybody give any ideas how to solve my problem, please?
I am using linux-2.6.0-testXX versions.
With best regards
Pawel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Outgoing interface selection by source address
@ 2003-11-27 13:55 Pawel Hadam
2003-11-27 14:20 ` Ralf Spenneberg
0 siblings, 1 reply; 10+ messages in thread
From: Pawel Hadam @ 2003-11-27 13:55 UTC (permalink / raw)
To: netfilter
Hi all
I have 2 local interfaces (eth0 & eth1) and thus 2 IPv6 addresses (src0 &
src1).
I have an SCTP/IPv6 application that binds to one of the addresses
(let's say src0) and sends packets to some destination (dst). But
according to the classical routing policy, all packets in this
connection (src0, dst) are routed via eth1. And I would like them to be
routed via interface eth0, as src0 is the address of eth0 not eth1.
Is it possible to do it with netfilter for IPv6 ? I mean, is it possible
to route the packets via the proper outgoing interface by theirs source
address, like this:
if (src = src0) then send via eth0
if (src = src1) then send via eth1
if (src = other) do whatever
Could anybody give any ideas how to solve my problem, please?
I am using linux-2.6.0-testXX versions.
With best regards
Pawel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 13:55 Pawel Hadam
@ 2003-11-27 14:20 ` Ralf Spenneberg
0 siblings, 0 replies; 10+ messages in thread
From: Ralf Spenneberg @ 2003-11-27 14:20 UTC (permalink / raw)
To: Pawel Hadam; +Cc: Netfilter
Am Don, 2003-11-27 um 14.55 schrieb Pawel Hadam:
> Hi all
>
> I have 2 local interfaces (eth0 & eth1) and thus 2 IPv6 addresses (src0 &
> src1).
>
> I have an SCTP/IPv6 application that binds to one of the addresses
> (let's say src0) and sends packets to some destination (dst). But
> according to the classical routing policy, all packets in this
> connection (src0, dst) are routed via eth1. And I would like them to be
> routed via interface eth0, as src0 is the address of eth0 not eth1.
> Is it possible to do it with netfilter for IPv6 ? I mean, is it possible
> to route the packets via the proper outgoing interface by theirs source
> address, like this:
It is, but not using netfilter (AFAIK). Take a look at the
Linux Advanced Routing and Traffic Howto: lartc.org
Cheers,
Ralf
--
Ralf Spenneberg
RHCE, RHCX
Book: VPN mit Linux
Book: Intrusion Detection für Linux Server http://www.spenneberg.com
IPsec-Howto http://www.ipsec-howto.org
Honeynet Project Mirror: http://honeynet.spenneberg.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 13:51 Outgoing interface selection by source address Pawel Hadam
@ 2003-11-27 15:20 ` Henrik Nordstrom
2003-11-27 15:27 ` Sven-Haegar Koch
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Henrik Nordstrom @ 2003-11-27 15:20 UTC (permalink / raw)
To: Pawel Hadam; +Cc: netfilter-devel
On Thu, 27 Nov 2003, Pawel Hadam wrote:
> connection (src0, dst) are routed via eth1. And I would like them to be
> routed via interface eth0, as src0 is the address of eth0 not eth1.
For this you need to use policy routing. I assume this exists in IPv6 as
well as it does in IPv4. This question is not really iptables related.
For IPv4 see the Linux advanced routing howto for details.
Regards
Henrik
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 15:20 ` Henrik Nordstrom
@ 2003-11-27 15:27 ` Sven-Haegar Koch
2003-11-27 15:33 ` Pawel Hadam
2003-11-27 15:30 ` Pawel Hadam
2003-11-27 15:55 ` Pawel Hadam
2 siblings, 1 reply; 10+ messages in thread
From: Sven-Haegar Koch @ 2003-11-27 15:27 UTC (permalink / raw)
To: Henrik Nordstrom; +Cc: Pawel Hadam, netfilter-devel
On Thu, 27 Nov 2003, Henrik Nordstrom wrote:
> On Thu, 27 Nov 2003, Pawel Hadam wrote:
> > connection (src0, dst) are routed via eth1. And I would like them to be
> > routed via interface eth0, as src0 is the address of eth0 not eth1.
>
> For this you need to use policy routing. I assume this exists in IPv6 as
> well as it does in IPv4. This question is not really iptables related.
nope, no policy-routing for ipv6 - this is one of the big area's where
linux ipv6-support is still way behind ipv4.
c'ya
sven
--
The Internet treats censorship as a routing problem, and routes around it.
(John Gilmore on http://www.cygnus.com/~gnu/)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 15:20 ` Henrik Nordstrom
2003-11-27 15:27 ` Sven-Haegar Koch
@ 2003-11-27 15:30 ` Pawel Hadam
2003-11-27 15:55 ` Pawel Hadam
2 siblings, 0 replies; 10+ messages in thread
From: Pawel Hadam @ 2003-11-27 15:30 UTC (permalink / raw)
Cc: netfilter-devel
On Thu, 27 Nov 2003, Henrik Nordstrom wrote:
> > connection (src0, dst) are routed via eth1. And I would like them to
be
> > routed via interface eth0, as src0 is the address of eth0 not eth1.
>
> For this you need to use policy routing. I assume this exists in IPv6 as
> well as it does in IPv4. This question is not really iptables related.
> For IPv4 see the Linux advanced routing howto for details.
Thanks, I am affraid it works only with IPv4 (and not with IPv6), so I
asked here for some other solution.
Regards
Pawel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 15:27 ` Sven-Haegar Koch
@ 2003-11-27 15:33 ` Pawel Hadam
0 siblings, 0 replies; 10+ messages in thread
From: Pawel Hadam @ 2003-11-27 15:33 UTC (permalink / raw)
To: Sven-Haegar Koch; +Cc: netfilter-devel
On Thu, 27 Nov 2003, Sven-Haegar Koch wrote:
> > > connection (src0, dst) are routed via eth1. And I would like them to be
> > > routed via interface eth0, as src0 is the address of eth0 not eth1.
> >
> > For this you need to use policy routing. I assume this exists in IPv6 as
> > well as it does in IPv4. This question is not really iptables related.
>
> nope, no policy-routing for ipv6 - this is one of the big area's where
> linux ipv6-support is still way behind ipv4.
And that is what I was affraid of.
Maybe someone has any other idea how to route the IPv6 packet (with
fixed source address) via the proper interface, and not via the interface
chosen by destination address routing ???
Pawel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 15:20 ` Henrik Nordstrom
2003-11-27 15:27 ` Sven-Haegar Koch
2003-11-27 15:30 ` Pawel Hadam
@ 2003-11-27 15:55 ` Pawel Hadam
2003-11-27 16:15 ` Henrik Nordstrom
2 siblings, 1 reply; 10+ messages in thread
From: Pawel Hadam @ 2003-11-27 15:55 UTC (permalink / raw)
To: Henrik Nordstrom; +Cc: netfilter-devel
On Thu, 27 Nov 2003, Henrik Nordstrom wrote:
> > connection (src0, dst) are routed via eth1. And I would like them to be
> > routed via interface eth0, as src0 is the address of eth0 not eth1.
>
> For this you need to use policy routing. I assume this exists in IPv6 as
> well as it does in IPv4. This question is not really iptables related.
And what does "IP6 tables support -> EUI64 address check" option in the
kernel ??? Cannot it be used to select the route by source address? In
help I can read:
CONFIG_IP6_NF_MATCH_EUI64:
This module performs checking on the IPv6 source address
Compares the last 64 bits with the EUI64 (delivered
from the MAC address) address
Pawel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 15:55 ` Pawel Hadam
@ 2003-11-27 16:15 ` Henrik Nordstrom
2003-11-28 11:03 ` IP v6
0 siblings, 1 reply; 10+ messages in thread
From: Henrik Nordstrom @ 2003-11-27 16:15 UTC (permalink / raw)
To: Pawel Hadam; +Cc: netfilter-devel
On Thu, 27 Nov 2003, Pawel Hadam wrote:
> And what does "IP6 tables support -> EUI64 address check" option in the
> kernel ??? Cannot it be used to select the route by source address? In
> help I can read:
It can match, but it can not select the route..
For this policy routing really should be used, but it might also be
possible to implement at ROUTE target like in IPv4 iptables
extra/ROUTE.patch if implementing policy routing is too hard.
Regards
Henrik
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Outgoing interface selection by source address
2003-11-27 16:15 ` Henrik Nordstrom
@ 2003-11-28 11:03 ` IP v6
0 siblings, 0 replies; 10+ messages in thread
From: IP v6 @ 2003-11-28 11:03 UTC (permalink / raw)
To: netfilter-devel
I think it can be done with ROUTE-ipv6 patch made by Cedric de Launois. I asked a question about this a while ago as I had a compile error with it (it's fixed already btw) but I never got to actually test it due to lack of time but I believe it can be done with that, it's in POM cvs in extra/, have a look :)
-Robby
-----------------------------------------------------
Mail.be, WebMail and Virtual Office
http://www.mail.be
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-11-28 11:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-27 13:51 Outgoing interface selection by source address Pawel Hadam
2003-11-27 15:20 ` Henrik Nordstrom
2003-11-27 15:27 ` Sven-Haegar Koch
2003-11-27 15:33 ` Pawel Hadam
2003-11-27 15:30 ` Pawel Hadam
2003-11-27 15:55 ` Pawel Hadam
2003-11-27 16:15 ` Henrik Nordstrom
2003-11-28 11:03 ` IP v6
-- strict thread matches above, loose matches on Subject: below --
2003-11-27 13:55 Pawel Hadam
2003-11-27 14:20 ` Ralf Spenneberg
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.