Skip to contentSkip to conversation

question about -t nat

DISCUSSION Postmaster 3 participants 7 messages Jun 19, 2004

lore
Share & tools
lore

Postmaster

author
#0 lore raw

shurely, i buy an -A ;)
i'm so excited because of formula one in indy. but my question still remains.

best regards

Jan

#1 lore raw
Quoted 7 lines · Postmaster

shurely, i buy an -A ;)
i'm so excited because of formula one in indy. but my question still remains.

best regards

Jan

But what, exactly, is the question?

Signature · 9 lines
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
[email protected]
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 
author
#2 lore raw
Quoted 1 line

But what, exactly, is the question?

I'm not sure after your question. The following error "iptables: target problem" comes, if i enter this rule in a user-chain:
iptables -t nat -A first_group -s a.b.c.d -d x/y -p tcp --dport 10001 \
-j DNAT --to-destination 1.2.3.4:25

her are my version and modules:
uname -r --> 2.4.20
iptables -V --> v1.2.8
lsmod --> ipt_REJECT
ipt_REDIRECT
ipt_limit
ipt_LOG
ipt_multiport
ipt_state
ipt_MASQUERADE
iptable_filter
iptable_nat
ip_conntrack_ftp
ip_conntrack
ip_tables

after your asks i made a test on a other maschine. what an miracle, the same rule works fine. and here my question again. what kind of modul is missing to me?

best regards

Jan

#3 lore raw
Quoted 23 lines · Postmaster
Quoted 1 line

But what, exactly, is the question?

I'm not sure after your question. The following error "iptables: target problem" comes, if i enter this rule in a user-chain:
iptables -t nat -A first_group -s a.b.c.d -d x/y -p tcp --dport 10001 \
-j DNAT --to-destination 1.2.3.4:25

her are my version and modules:
uname -r --> 2.4.20
iptables -V --> v1.2.8
lsmod --> ipt_REJECT
ipt_REDIRECT
ipt_limit
ipt_LOG
ipt_multiport
ipt_state
ipt_MASQUERADE
iptable_filter
iptable_nat
ip_conntrack_ftp
ip_conntrack
ip_tables

Quoted 7 lines

after your asks i made a test on a other maschine. what an miracle, the same rule works fine. and here my question again. what kind of modul is missing to me?

best regards

Jan

Hmmm . . . I'll have to defer to others who know more about modules. I always compile mine as part of the kernel just in case. I see the iptable_nat so I'm not sure what's missing. Is there any chance the userland tools are mismatched to the kernel?

Signature · 9 lines
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
[email protected]
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 
#4 lore raw
Quoted 7 lines · John A. Sullivan III
Quoted 6 lines · Postmaster
Quoted 1 line

But what, exactly, is the question?

I'm not sure after your question. The following error "iptables: target problem" comes, if i enter this rule in a user-chain:
iptables -t nat -A first_group -s a.b.c.d -d x/y -p tcp --dport 10001 \
-j DNAT --to-destination 1.2.3.4:25

DNAT target can only be used with PREROUTING and OUTPUT.

Dan

#5 lore raw
Quoted 4 lines · Daniel Wittenberg
Quoted 3 lines · John A. Sullivan III
Quoted 2 lines · Postmaster
Quoted 1 line

But what, exactly, is the question?

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

I'm not sure after your question. The following error "iptables: target problem" comes, if i enter this rule in a user-chain:
iptables -t nat -A first_group -s a.b.c.d -d x/y -p tcp --dport 10001 \
-j DNAT --to-destination 1.2.3.4:25

DNAT target can only be used with PREROUTING and OUTPUT.

Dan

Thankfully, that is not true! I just about had a heart attack because we make heavy use of DNAT outside of PREROUTING and OUTPUT in the automatic NAT configuration facility of the ISCS project
(http://iscs.sourceforge.net). I've just tested it and, indeed, DNAT can be used in user created chains as long as those chains are in the nat table. Of course, if Postmaster's first_group chain is not in the nat table, that would be a problem :-) - John

Signature · 3 lines
Open Source Development Corporation
Financially sustainable open source development
http://www.opensourcedevelopmentcorp.com
author
#6 lore raw
In reply to John A. Sullivan III
Quoted 5 lines

Hmmm . . . I'll have to defer to others who know more about modules. I always compile mine as part of the kernel just in case. I see the iptable_nat so I'm not sure what's missing. Is there any chance the userland tools are mismatched to the kernel?

unfortunately not. otherwise i could change something. both machines are clean and selfmade from scratch.
the differential of the second mashine is the kernelversion 2.4.22 with CONFIG_KMOD --> y. but on the real firewall i wont do anything automaticly. on a third mashine kernel 2.4.26, iptables 1.2.9 and all of modules are build in kernel, a rule with DNAT in a userchain also wont work. i believe nearly in an error on the second mashine :(

Jan