查看状态:iptables -L -n下面添加对特定端口开放的方法:使用iptables开放如下端口/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT保存/etc/rc.d/init.d/iptables save重启服务service ipt ...
分类:
系统相关 时间:
2017-08-29 09:29:26
阅读次数:
209
vi /etc/sysconfig/iptables 将 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT (允许80端口) 添加到22端口配置的下面 最后如图: 重启防火墙: /etc/init.d/iptables ...
分类:
其他好文 时间:
2017-08-25 19:22:19
阅读次数:
122
iptables命令-t指定表名称DROP丢弃-n不做解析-N增加链-L列出指定表的策略-E修改链名称-A增加策略-X删除链--dport端口-D删除指定策略-s数据来源-I插入-j动作-R修改策略ACCEPT允许-P(大写)修改默认策略REJECT拒绝-p(小写)端口例如:如下基本操作命令iptables-tfilter-nL#查看..
分类:
系统相关 时间:
2017-08-19 23:30:30
阅读次数:
226
1、允许20 21 端口iptables -I INPUT -p tcp -m multiport --dport 20,21 -j ACCEPT 2、允许关联包通过iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 3、 ...
分类:
其他好文 时间:
2017-08-18 11:05:49
阅读次数:
170
[root@localhost ~]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT[root@localhost ~]# /etc/rc.d/init.d/iptables savebash: /etc/rc.d/init.d/ipta ...
分类:
数据库 时间:
2017-08-14 00:35:57
阅读次数:
193
[root@localhost html]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT [root@localhost html]# /etc/init.d/iptables save [root@localhost html]# /et ...
分类:
其他好文 时间:
2017-08-12 16:17:59
阅读次数:
133
find /home/example/ -type f -name "*.conf" -print|xargs sed -i 's/192\.168\.0\.2/db01/g' iptables -A INPUT -p tcp -m multiport --dport 22,80,443 -j AC ...
分类:
系统相关 时间:
2017-08-07 13:33:57
阅读次数:
272
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8089 -j ACCEPT -A INPUT -m state ... ...
分类:
系统相关 时间:
2017-08-02 00:43:57
阅读次数:
196
mysql配置 1.设置数据库用户名和密码 mysqladmin -u root password "root" 2.打开3306端口号 iptables -I INPUT -p tcp --dport 3306 -j ACCEPT 3.开放端口立即 /etc/rc.d/init.d/iptable ...
分类:
数据库 时间:
2017-07-28 13:27:45
阅读次数:
291
准备篇: 1、配置防火墙,开启80端口、3306端口 vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT(允许80端口通过防火墙) -A INPUT -m state ...
分类:
Web程序 时间:
2017-07-21 23:09:29
阅读次数:
272