app教程网 综合百科 linux如何打开防火墙(linux中打开防火墙的命令)

linux如何打开防火墙(linux中打开防火墙的命令)

Run the following commands in turn: /sbin/iptables -I input -p tcp-dport 80 -j accept # open port 80 /sbin/iptables -I input -p tcp-dport 22 -j accept # open port 22 /etc/rc.d/init.d/iptables save # save the configuration/etc/rc.

Check the status of the opened ports /etc/init.d/iptables. The results are as follows: Number of filter chain inputs (policy acceptance) Target protection options Source Target 2 accepts TCP-0.0.0.0/0 TCP DPT: 22 3 accepts TCP-0.0.0/0.0.0/0 TCP DPT: 80.

本文来自网络,不代表本站立场,转载请注明出处:https: