参考 具体需要修改里面的代码,版本比较旧
http://tldp.org/HOWTO/Querying-libiptc-HOWTO/
下载iptables源代码,然后解压
./configure --prefix=/opt/iptables && make && make install
mkdir /opt/iptablesdev
cp -r include /opt/iptablesdev
cp -r /opt/iptables/lib /opt/iptablesdev
vim main.c