参考博文: iptables防火墙只允许指定ip连接指定端口.访问指定网站 一.配置防火墙 打开配置文件 [root@localhost ~]# vi /etc/sysconfig/iptables 正确的配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [:] :