Skip to contentSkip to conversation

NAT only - No connection tracking

DISCUSSION Jet 5 participants 8 messages Nov 11, 2002 – Nov 13, 2002

lore
Share & tools
lore

Jet

author
#0 lore raw

Hi all,

How can I make my iptable to do just NAT, no connection tracking?

No matter how hard I tried to configure netfilter to load only iptable_nat, it will load ip_conntrack too.

Basically, I want to make my iptable to become a NAT device without stateful inspection.
It this possible?

.//Jet

#1 lore raw
Quoted 10 lines · --- Jet

Hi all,

How can I make my iptable to do just NAT, no connection tracking?

No matter how hard I tried to configure netfilter to load only iptable_nat, it will load ip_conntrack too.

Basically, I want to make my iptable to become a NAT device without stateful inspection.
It this possible?

No.

Quoted 4 lines

.//Jet

Brad

=====
Brad Chapman

Permanent e-mail: [email protected]

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2 lore raw
Quoted 7 lines · Brad Chapman
Quoted 5 lines

How can I make my iptable to do just NAT, no connection tracking?

Basically, I want to make my iptable to become a NAT device without stateful inspection.
It this possible?

No.

Hi Brad - long time no hear...

Why do you think this is not possible ?

Antony.

Signature · 3 lines
What is this talk of software 'release' ?
Our software evolves and matures until it becomes capable of escape,
leaving a bloody trail of designers and quality assurance people in its wake.
#3 lore raw

Mr. Antony,

Quoted 11 lines · --- Antony Stone
Quoted 7 lines · Brad Chapman
Quoted 5 lines

How can I make my iptable to do just NAT, no connection tracking?

Basically, I want to make my iptable to become a NAT device without stateful inspection.
It this possible?

No.

Hi Brad - long time no hear...

When you don't have all day to bathe your retina in EM radiation, then your presence sometimes decreases ;)

Quoted 2 lines

Why do you think this is not possible ?

Sorry for being so short, I was busy.

Basically, if this person wants to do NAT, he has to do connection tracking as well. LYSB, he doesn't have to run ctrack without NAT, but without ctrack the current implementation of NAT in netfilter won't work. If there are other stateless NAT kernel implementations available that attach to netfilter, then I am currently unaware of them.

Quoted 2 lines

Antony.

Brad

Quoted 7 lines
Signature · 5 lines
-- 

What is this talk of software 'release' ?
Our software evolves and matures until it becomes capable of escape,
leaving a bloody trail of designers and quality assurance people in its wake.

=====
Brad Chapman

Permanent e-mail: [email protected]

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#4 lore raw
Quoted 11 lines · Brad Chapman

Mr. Antony,

Quoted 8 lines · --- Antony Stone
Quoted 6 lines · Brad Chapman
Quoted 5 lines

How can I make my iptable to do just NAT, no connection tracking?

Basically, I want to make my iptable to become a NAT device without stateful inspection.
It this possible?

If you don't want connection tracking but want NAT just use the old ipchains instead of iptables.

-Ben.

#5 lore raw
In reply to Brad Chapman
Quoted 7 lines · Brad Chapman

Basically, if this person wants to do NAT, he has to do connection tracking as well. LYSB, he doesn't have to run ctrack without NAT, but without ctrack the current implementation of NAT in netfilter won't work. If there are other stateless NAT kernel implementations available that attach to netfilter, then I am currently unaware of them.

Hi Brad & Antony,

There is one other way to do NAT without connection tracking - this is even possible on 2.2 kernels. There is some NAT functionality in the routing code (policy routing, advanced routing).

This is a form of NAT where only the IP addresses in the IP header are changed, no data inside the packet payload is inspected or changed. Also, there is no automatic retranslation of return packets, like with iptables.

The syntax is a little different and takes some time to get used to; basically you get something like this:

ip rule add from 192.168.1.32/27 nat 10.1.1.32 prio 14000 ip route add nat 10.1.1.32/27 via 192.168.1.32

to set up NAT rules.

For more info, see the iproute documentations. I can also recommend the book "Policy Routing with Linux" by Matthew G. Marsh, who is also a contributor on this list.

The book is being released online at http://www.policyrouting.org/,
but is definately worth the buy.

Regards,
Filip

#6 lore raw

Mr. Filip,

Quoted 11 lines · --- Filip Sneppe
Quoted 2 lines · Brad Chapman

Basically, if this person wants to do NAT, he has to do connection tracking as

well.

Quoted 5 lines

LYSB, he doesn't have to run ctrack without NAT, but without ctrack the current implementation of NAT in netfilter won't work. If there are other stateless NAT kernel implementations available that attach to netfilter, then I am currently unaware of them.

Hi Brad & Antony,

Quoted 8 lines

There is one other way to do NAT without connection tracking - this is even possible on 2.2 kernels. There is some NAT functionality in the routing code (policy routing, advanced routing).

This is a form of NAT where only the IP addresses in the IP header are changed, no data inside the packet payload is inspected or changed. Also, there is no automatic retranslation of return packets, like with iptables.

*thunk*

Duh! I had forgotten about that, having never used it. Good call. Maybe the original poster will be interested in this.

Quoted 13 lines

The syntax is a little different and takes some time to get used to; basically you get something like this:

ip rule add from 192.168.1.32/27 nat 10.1.1.32 prio 14000 ip route add nat 10.1.1.32/27 via 192.168.1.32

to set up NAT rules.

For more info, see the iproute documentations. I can also recommend the book "Policy Routing with Linux" by Matthew G. Marsh, who is also a contributor on this list.

Quoted 7 lines

The book is being released online at http://www.policyrouting.org/,
but is definately worth the buy.

Regards,
Filip

Brad

=====
Brad Chapman

Permanent e-mail: [email protected]

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

author
#7 lore raw
In reply to Filip Sneppe

Thanks for all the reply.

I'm now looking at http://www.policyrouting.org/ and might plan to buy a copy of it.

Thanks again everyone here for such a good help.

.//Jet

----- Original Message -----
From: "Filip Sneppe" <[email protected]>
To: "Brad Chapman" <[email protected]>
Cc: "Antony Stone" <[email protected]>; <[email protected]>
Sent: Tuesday, November 12, 2002 7:14 PM
Subject: Re: NAT only - No connection tracking

Quoted 8 lines
Quoted 1 line

The book is being released online at http://www.policyrouting.org/,
but is definately worth the buy.

Regards,
Filip