Bug 67835 - iptables can't DNAT OUTPUT packets any longer
Summary: iptables can't DNAT OUTPUT packets any longer
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-02 18:22 UTC by Alexandre Oliva
Modified: 2007-04-18 16:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-23 15:34:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Alexandre Oliva 2002-07-02 18:22:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610

Description of problem:
iptables -t nat -A OUTPUT -d 143.106.24.189 -j DNAT --to-dest 172.31.160.17,
that used to work with kernel 2.4.9-34, no longer works with kernel 2.4.18-5.  I
haven't verified that it is not iptables-1.2.5-3 that's passing incorrect
arguments to the kernel, but I've checked with strace that it is the kernel that
is returned the EINVAL error to userland.  The man page still says DNAT is valid
in the nat OUTPUT table.

Version-Release number of selected component (if applicable):
kernel-2.4.18-5.athlon

How reproducible:
Always

Steps to Reproduce:
Starting from empty (or otherwise) iptables, run:
  iptables -t nat -A OUTPUT -d ip.address.of.choice -j DNAT --to-dest
any.other.ip.address


Actual Results:  iptables: Invalid argument


Expected Results:  it should start redirecting outgoing packets originally
addressed to ip.address.of.choice to any.other.ip.address

Additional info:

Comment 1 Alexandre Oliva 2002-07-02 19:13:31 UTC
Looks like this is just because kernel.config says:

# CONFIG_IP_NF_NAT_LOCAL is not set

and ip_nat_rule does:

#ifndef CONFIG_IP_NF_NAT_LOCAL
	if (hook_mask & (1 << NF_IP_LOCAL_OUT)) {
		DEBUGP("DNAT: CONFIG_IP_NF_NAT_LOCAL not enabled\n");
		return 0;
	}
#endif

but why is this feature disabled by default?

Comment 2 Alexandre Oliva 2003-01-23 15:34:19 UTC
I see this is fixed in the pheobe beta2 kernel, in that IP_NF_NAT_LOCAL is built
as a module.  Can't tell for how long it's been fixed, but thanks!


Note You need to log in before you can comment on or make changes to this bug.