Armadilloフォーラム

iptablesによるNAT

genki

2014年8月11日 23時52分

お世話になります.
山内と申します.

現在,armadillo-810を使い,iptablesによるNATを設定したいと考えております.
しかしながら,natを使った設定を行おうとすると,以下のようなエラーが発生します.

# iptables -t nat -A PREROUTING -m tcp -p tcp --source 220.13.13.13 --dport 61111 -j DNAT --destination 10.13.13.13
# modprobe: module 'ip_tables' not found
# iptables v1.3.6: can't initialize iptables table `nat': Table does not exist (do yo)

以前のカーネルの設定方法(http://armadillo.atmark-techno.com/faq/iptables-target-not-found)はあったのですが,
最新版(3.4-at9)では,上記のページのNAT周りを有効にしている箇所が存在しません.

どのように設定すればよいか,ご存知の方がいれば教えていただけますか.
よろしくお願いいたします.

ファイル ファイルの説明
カーネル設定画面.jpg
コメント

genki

2014年8月21日 18時03分

お世話になっております.

> 最新版(3.4-at9)では,上記のページのNAT周りを有効にしている箇所が存在しません.

カーネル2.xでは,NATを有効にすることはできそうですが,Armadillo-810を使用しているため,
カーネルは3以降のものしか利用することができません.

カーネル3にてNATを利用する場合,どのようにすればよろしいのでしょうか.
よろしくお願いいたします.

at_makoto.harada

2014年8月28日 17時33分

原田です。

動作確認はしていませんが、NATを使用するためには、少なくとも以下のコンフィグを
有効にする必要があります。これで試して見て下さい。

Symbol: NF_CONNTRACK [=n]
Type : tristate
Prompt: Netfilter connection tracking support
Defined at net/netfilter/Kconfig:35
Depends on: NET [=y] && INET [=y] && NETFILTER [=y]
Location:
-> Networking support (NET [=y])
-> Networking options
-> Network packet filtering framework (Netfilter) (NETFILTER [=y])
-> Core Netfilter Configuration

Symbol: NF_CONNTRACK_IPV4 [=n]
Type : tristate
Prompt: IPv4 connection tracking support (required for NAT)
Defined at net/ipv4/netfilter/Kconfig:12
Depends on: NET [=y] && INET [=y] && NETFILTER [=y] && NF_CONNTRACK [=n]
Location:
-> Networking support (NET [=y])
-> Networking options
-> Network packet filtering framework (Netfilter) (NETFILTER [=y])
-> IP: Netfilter Configuration
Selects: NF_DEFRAG_IPV4 [=n]

Symbol: NF_NAT [=n] │ Type : tristate
Prompt: Full NAT
Defined at net/ipv4/netfilter/Kconfig:146
Depends on: NET [=y] && INET [=y] && NETFILTER [=y] && IP_NF_IPTABLES [=y] && NF_CONNTRACK_IPV4 [=n]
Location:
-> Networking support (NET [=y])
-> Networking options
-> Network packet filtering framework (Netfilter) (NETFILTER [=y])
-> IP: Netfilter Configuration
-> IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES [=y])