From: "Steffen Heil" <lists@steffen-heil.de>
To: netfilter@vger.kernel.org
Subject: Route packets by source IP
Date: Tue, 18 Mar 2008 13:01:45 +0100 [thread overview]
Message-ID: <384787EBFB86488EAB82D80861A37F27@shs1> (raw)
[-- 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 --]
next reply other threads:[~2008-03-18 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 12:01 Steffen Heil [this message]
2008-03-18 14:18 ` Route packets by source IP 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
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=384787EBFB86488EAB82D80861A37F27@shs1 \
--to=lists@steffen-heil.de \
--cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox