All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Route away packets addressed to the machine itself w/iproute and
@ 2005-02-18 21:16 Gerardo Arceri
  0 siblings, 0 replies; only message in thread
From: Gerardo Arceri @ 2005-02-18 21:16 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

I have a box with only 1 IP (lets say 10.0.0.1) which has an ipip tunnel 
to another machine (lets say 10.2.0.1)(different networks)  i wan't all 
packets coming to 10.0.0.1 destination port 80 be routed thru the tunnel 
device and be answered by 10.2.0.2 (which has an interface configured  
with 10.0.0.1).
It works if the incoming ip address is not configured on the receiving 
machine (but is configured to be arpproxied) but not with the "main" ip 
address.
This is what i did to test
on 10.0.0.1
ifconfig
eth0: main interface
tunnel2: ipip tunnel interface to 10.2.0.2

/etc/iproute/rt_tables
added:
100   myroute


iptables -A PREROUTING -t mangle -d 10.0.0.1 -p tcp --dport 80 -j MARK 
--set-mark 99
ip route add table test dev tunnel2
ip rule add fwmark 99 table test


in 10.0.0.2
ifconfig eth0:101 10.0.0.1 netmask 255.255.255.255

What i'm doing wrong ?
Thanks!
 

[-- Attachment #2: Type: text/html, Size: 1319 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-18 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-18 21:16 [LARTC] Route away packets addressed to the machine itself w/iproute and Gerardo Arceri

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.