在OS X上编译iptables失败

时间:2016-04-07 02:12:18

标签: macos iptables

wget http://www.netfilter.org/projects/iptables/files/iptables-1.6.0.tar.bz2
tar jxvf iptables-1.6.0.tar.bz2
cd iptables-1.6.0
./configure
make 

make步骤中,我遇到错误:

../include/linux/types.h:4:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
     ^
1 error generated.
make[2]: *** [libip4tc.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:2)

IPTables在OSX上根本不起作用。 IPTables使用netfilter进入内核。使用OS X,内核扩展是绑定内核的唯一方法。除非您使用的是OS X的开发版本,否则没有其他方法可以挂钩到TCPIP /网络堆栈。