打开一个端口:iptables –A INPUT –p tcp --dport 11901 –j Accept -A, append to INPUT/ OUTPUT chain; -p, protocal, tcp/upd/icmp --dport, destinate port, means the outer access the port, relative option is –sport, source port, means the the port packets will be out; -j, means jump, jump to target: Accept/ Drop 查看iptables内容iptables –L,如果想要删除规则,首先 iptables –L –line-number 显式带有行号的规则列表,然后通过 iptables –D INPUT/OUTPUT num 进行删除,需要制定INPUT以及output是因为这是两张独立的链表(chain),索引行号也是独立的;