Regarding the iptables error when configuring eth0 and NAT on LS1012A

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Regarding the iptables error when configuring eth0 and NAT on LS1012A

463件の閲覧回数
pengluo
Contributor III

I configured iptables (Linux firewall) as a NAT router according to the following method:

root@OpenWrt:/# iptables -P INPUT DROP
root@OpenWrt:/# iptables -P FORWARD DROP
root@OpenWrt:/# iptables -A INPUT -ieth2 -j ACCEPT
root@OpenWrt:/# iptables -A INPUT -ilo -j ACCEPT

 

But I encountered an error when executing this instruction:

root@OpenWrt:/# iptables -A FORWARD -i eth0 -o eth2 -m state --state RELATED,ES
TABLISHED -j ACCEPT
iptables v1.6.1: Couldn't load match `state':No such file or directory

Try `iptables -h' or 'iptables --help' for more information.

When this instruction is doing NAT, if the default rule of FORWARD is DROP, it must be set。Is there any way to solve this problem?

 

0 件の賞賛
0 返答(返信)