Gentoo Archives: gentoo-user

From: Daniel Iliev <daniel.iliev@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] DNAT not working
Date: Sun, 13 Jan 2008 23:19:02
Message-Id: 20080114011831.5289a466@ilievnet.com
In Reply to: [gentoo-user] DNAT not working by Konstantinos Agouros
1 On Sun, 13 Jan 2008 20:01:04 +0000 (UTC)
2 Konstantinos Agouros <elwood@×××××××.de> wrote:
3
4 > Hi,
5 >
6 > I have a box running vmware server where I need some DNAT rules to get
7 > traffic from a vm to where it belongs. Inserting the rule
8 > iptables -t nat -I PREROUTING -s ... -d ... -p tcp --dport ... -j
9 > DNAT --to-destination destaddr
10 >
11 > gives me:
12 >
13 > iptables: No chain/target/match by that name
14 >
15 > Also I had to manually modprobe iptable_nat since iptables -L didn't
16 > initialize everything. I rebuilt iptables to match the current kernel
17 > (2.6.23-gentoo-r3) no luck. Strace on the command showed me
18 > setsockopt(3, SOL_IP, 0x40 /* IP_??? */,
19 > "nat\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
20 > 920) = -1 ENOENT (No such file or directory)
21 >
22 > Anybody got an idea what I am doing from?
23 >
24 > Regards,
25 >
26 > Konstantin
27
28
29
30 I believe you've forgotten to build support for NAT in your kernel:
31
32
33
34 │ Symbol: IP_NF_IPTABLES [=m]
35 │ Prompt: IP tables support (required for filtering/masq/NAT)
36 │ Defined at net/ipv4/netfilter/Kconfig:45
37 │ Depends on: NET && INET && NETFILTER
38 │ Location:
39 │ -> Networking
40 │ -> Networking support (NET [=y])
41 │ -> Networking options
42 │ -> Network packet filtering framework (Netfilter) (NETFILTER [=y])
43 │ -> IP: Netfilter Configuration
44 │ Selects: NETFILTER_XTABLES
45
46
47 --
48 Best regards,
49 Daniel
50 --
51 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] DNAT not working Konstantinos Agouros <elwood@×××××××.de>