From: Michael Harris <mharris@torque.net>
To: lartc@vger.kernel.org
Subject: [LARTC] ip route nat problem
Date: Wed, 22 Sep 2004 15:34:36 +0000 [thread overview]
Message-ID: <200409221134.36677.mharris@torque.net> (raw)
After upgrading our router from redhat 7.3 (linux 2.4.18 ) to mandrake 10.0
(linux 2.6.3) some of our routing scripts failed. This configuration worked
properly before we changed distributions.
X.X.X.2 is supposed to recieve traffic for X.X.X.6 and nat that to Z.Z.Z.46
ip addr list |grep 'eth[0123]'
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet X.X.X.2/28 brd X.X.X.15 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet Z.Z.Z.7/24 brd Z.Z.Z.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet Y.Y.Y.5/24 brd Y.Y.Y.255 scope global eth2
5: eth3: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet W.W.W.74/29 brd W.W.W.79 scope global eth3
My current routing table is:
W.W.W.72/29 dev eth3 scope link
X.X.X.0/28 dev eth0 scope link
Y.Y.Y.0/24 dev eth2 scope link
Z.Z.Z.0/24 dev eth1 scope link
127.0.0.0/8 dev lo scope link
default via W.W.W.73 dev eth3
When i try adding these rules:
ip route add default via X.X.X.1 dev eth0 table 200
ip route add nat X.X.X.6 via Z.Z.Z.46
ip rule add from Z.Z.Z.46 nat X.X.X.6 table 200
the second route causes this error: "RTNETLINK answers: File exists"
i have also tried changing the command to "append" rather than "add" the
route, but this has had no effect.
i have also tried this:
ip route add default via X.X.X.1 dev eth0 table 200
ip route append nat X.X.X.6 via Z.Z.Z.46 table 201
ip rule add to X.X.X.6 table 201
ip rule add from Z.Z.Z.46 nat X.X.X.6 table 200
That seems to work at first, however "ip route get 209.167.89.6"
returns the following error: RTNETLINK answers: Invalid argument
Any help would be greatly appreciated
--
Sincerely,
Michael Harris
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-09-22 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-22 15:34 Michael Harris [this message]
2004-09-23 4:17 ` [LARTC] ip route nat problem Patrick McHardy
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=200409221134.36677.mharris@torque.net \
--to=mharris@torque.net \
--cc=lartc@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.