Linux Netfilter discussions
 help / color / mirror / Atom feed
* Route packets by source IP
@ 2008-03-18 12:01 Steffen Heil
  2008-03-18 14:18 ` Grant Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Steffen Heil @ 2008-03-18 12:01 UTC (permalink / raw)
  To: netfilter

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

Hi

I have two servers, having public IPs A1, B1, connected via private IPs A2,
B2 on a openVPN network.
Now I need to make a service (port p) of server A1:p available via B1:p.
So I want to try the following:

1. At B: dnat every incoming connection for B1:p to A2:p.
    - this is to archieve my goal -
2. At A: Route every packet "from A2:P" to B2.
    - otherwise A would try to route to the client via its gateway, which
would fail because of the private sender ip. -

I think I can do the first:

iptables -t nat -I PREROUTING -p tcp --dport p -j DNAT --to A2:p

But I don't know how to do the second.
Any hints?

Regards,
  Steffen

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3109 bytes --]

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

end of thread, other threads:[~2008-03-20 14:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 12:01 Route packets by source IP Steffen Heil
2008-03-18 14:18 ` Grant Taylor
2008-03-19 18:21   ` Franck JONCOURT
2008-03-19 21:19     ` Grant Taylor
2008-03-19 22:03       ` Steffen Heil
2008-03-20  0:02         ` Grant Taylor
2008-03-20  0:30           ` Steffen Heil
2008-03-20 14:42             ` Grant Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox