All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Policy Routing and NAT
@ 2003-08-23  2:49 Robert Felber
  2003-08-23  9:27 ` Patrick McHardy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Felber @ 2003-08-23  2:49 UTC (permalink / raw)
  To: lartc

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

Hi, 

is there an issue with policy-routing and/or NAT?
I've been trying for months now to DNAT a host in a LAN.
The router has 3 NICs, 2 of them are connected to a) the internet
and b) an extranet. Now a host XYZ is visible with a unique IP on
both, the internet and extranet. I'll give you a little tcpdump fragment:
(eth0: inet, eth1: LAN, eth2: secured internet (extranet))
network 62.156.190. not administrable (t-systems).

eth0 < 62.156.190.37.48495 > 62.225.182.35.http
eth1 > 62.156.190.37.48495 > 192.168.0.3.http
eth1 < 192.168.0.3.http > 62.156.190.37.48495
eth2 > 62.225.182.35.http > 62.156.190.37.48495

as you can see, the packet leaves the wrong device.
I've already tried iproute2 rules like:

$IP route add table 2 via $INET_ROUTER dev eth0
$IP rule add from 62.225.182.32/29 lookup 2


also i don't understand why the router NATs it with 62.225.182.35 when
the postrouting rule is:

$IPTABLES -t nat -A POSTROUTING -o eth0 -s 192.168.0.3 \
 -j SNAT --to-source 62.225.182.35

(if you want to understand the full script look at
 http://robtone.mine.nu/ipt-set.txt )

Any suggestions or hints would be more than appreciated, thanks. :)


-- 
| Robert Felber (System-Administrator)            Tel: +49 (0) 89 / 453 12-86 |
| Autohaus Erich Kuttendreier                     Fax: +49 (0) 89 / 453 12-80 |
| Drosselweg 21                                   ICQ:              170059451 |
| 81827 Muenchen                                  PGP:               896CF30B |
|                                                                             |
| PGP-Fingerprint: CF36 AA93 9716 63E8 962F 15CC A80E 1A79 BF77 25EA          |

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-25 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-23  2:49 [LARTC] Policy Routing and NAT Robert Felber
2003-08-23  9:27 ` Patrick McHardy
2003-08-23 23:27 ` Robert Felber
2003-08-25 16:40 ` Robert Felber

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.