From: Mart Frauenlob <mart.frauenlob@chello.at>
To: netfilter@vger.kernel.org
Subject: Re: Disabling conntrack for local net
Date: Tue, 17 Nov 2009 11:03:45 +0100 [thread overview]
Message-ID: <4B027501.2010303@chello.at> (raw)
In-Reply-To: <034DEBCAE934A74991E6E76B8DA72D14185DD50A7F@HSSBS.holdstead.local>
Gary Smith wrote:
> Can anyone tackle the problem below? I need to NAT an external IP/Port internally (actually multiple, but one sample will do). I also need to access these from internally as well through the NAT'ing (because we don't control DNS). The final caveat is that we would like to skip conntrack for everything else (like MySql connections originating from one of the NAT'd boxes going to a non-NAT'd box internal, etc).
>
>
>> Here is an example of the rules we are running right now:
>>
>> _A PREROUTING -d 208.35.34.20 -p tcp -m tcp --dport 53 -j DNAT --to-
>> destination 10.40.16.21
>> -A PREROUTING -d 208.35.34.20 -p udp -m udp --dport 53 -j DNAT --to-
>> destination 10.40.16.21
>> -A PREROUTING -d 208.35.34.20 -j DNAT --to-destination 10.40.16.29
>> ...
>> -A POSTROUTING -s 10.40.16.21 -o eth1 -p tcp -m tcp --sport 53 -j SNAT --to-
>> source 208.35.34.20
>> -A POSTROUTING -s 10.40.16.21 -o eth1 -p udp -m udp --sport 53 -j SNAT --to-
>> source 208.35.34.20
>> -A POSTROUTING -s 10.40.16.29 -o eth1 -j SNAT --to-source 208.35.34.20
>> ...
>> -A POSTROUTING -s 10.0.0.0/255.0.0.0 -o eth1 -j SNAT --to-source 208.35.34.2
>>
>>
>> Given this, can someone whip up the proper raw/nat/filter on how to make this
>> NOTRACK and be able to route back inside?
>>
>>
Well, the RAWNAT target didn't seem to fit you?
You could always use iproute2 to do static nat.
OR - get routable IP addresses...
Regards
Mart
next prev parent reply other threads:[~2009-11-17 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 3:00 Disabling conntrack for local net Gary Smith
2009-10-23 5:09 ` Mart Frauenlob
2009-10-23 6:22 ` Mart Frauenlob
2009-10-23 16:26 ` Gary Smith
2009-11-16 23:32 ` Gary Smith
2009-11-17 10:03 ` Mart Frauenlob [this message]
2009-11-17 16:35 ` Gary Smith
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=4B027501.2010303@chello.at \
--to=mart.frauenlob@chello.at \
--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 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.