iptables NAT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
7,722件の閲覧回数
niklasmolin
Senior Contributor I

Hi.

I wonder if some one knows if it's possible to add NAT in the iptables (Yocto project)?

I checked in the .config file, but there seems to be no flag for that.

Is this something that is planned to be included?

Thanks,

Niklas

ラベル(2)
1 解決策
4,073件の閲覧回数
niklasmolin
Senior Contributor I

I managed to figure it out.

First I had to enable Netfilter connection tracking support in the Core Netfilter Configuration menu.

After that I go to IP: Netfilter Configuration menu, and enable IPv4 connection tracking support.

元の投稿で解決策を見る

6 返答(返信)
4,073件の閲覧回数
MarekVasut
Senior Contributor I

You mean CONFIG_IP_NF_IPTABLES is missing in the kernel config ?

0 件の賞賛
返信
4,073件の閲覧回数
niklasmolin
Senior Contributor I

I can find the CONFIG_IP_NF_IPTABLES, but I'm looking for NF_NAT, NF_NAT_IPV4 etc. I can't find them in the .config file.

I'm using kernel 3.10.9.

0 件の賞賛
返信
4,073件の閲覧回数
MarekVasut
Senior Contributor I

Well run

$ make ARCH=arm CROSS_COMPILE=... menuconfig

Then navigate into Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> IP: Netfilter Configuration -> IP tables support (required for filtering/masq/NAT)

... or you can just hit the 'slash' [/] key and type "IP_NF_IPTABLES" , which will give you the exact location of the config option.

0 件の賞賛
返信
4,074件の閲覧回数
niklasmolin
Senior Contributor I

I managed to figure it out.

First I had to enable Netfilter connection tracking support in the Core Netfilter Configuration menu.

After that I go to IP: Netfilter Configuration menu, and enable IPv4 connection tracking support.

4,073件の閲覧回数
gavingreenwalt
Contributor III

I'm glad to hear that it's possible, but could you share a noob-friendly list of everything that needs to be enabled to get iptables NAT working.

I tried just bitbaking the iptables package and created an iptables.ipk however on installation it warned that I was missing the kernel modules so I figure I might as well rebuild the whole thing since I'll need an image eventually anyway.

0 件の賞賛
返信
4,073件の閲覧回数
niklasmolin
Senior Contributor I

I can start the menuconfig and get down to IP tables support (required for filtering/masq/NAT)

But I can't find anywhere to enable NAT, to set the NF_NAT flag (and I can't find the NF_NAT in the .config file either).

0 件の賞賛
返信