Centos7中的防火墙调整为firewalld,试一下systemctl stop firewalld关闭防火墙。 -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(允许80端口通过防火墙) -A INPUT -m sta ...
分类:
其他好文 时间:
2016-04-24 15:41:29
阅读次数:
811
遇到这个问题三天了,在网上搜索了很多文章都说把时间调大,不过对于我来说没有什么用处。今天在解决另一个问题顺便解决了这个问题,给以后遇到此问题的同学做一个参考。 解决办法:1.关闭Linux防火墙 2.或者让2181端口通过防火墙。命令:iptables -I INPUT -p tcp --dport ...
分类:
其他好文 时间:
2016-04-21 15:11:52
阅读次数:
956
首先,清除所有预设置 其次,设置只允许指定ip地址访问指定端口 上面这两条,请注意--dport为目标端口,当数据从外部进入服务器为目标端口;反之,数据从服务器出去则为数据源端口,使用 --sport同理,-s是指定源地址,-d是指定目标地址。 然后,关闭所有的端口 最后,保存当前规则 这种ipta ...
分类:
其他好文 时间:
2016-04-18 17:16:29
阅读次数:
103
一、修改默认端口号 第一步: vi /etc/sysconfig/iptables 添加修改后的端口号的配置 -A INPUT -p tcp -m state --state NEW -m tcp --dport 22001 -j ACCEPT 本例中,使用22001端口 添加后保存配置并重启防火墙 ...
分类:
其他好文 时间:
2016-04-18 15:31:24
阅读次数:
164
centos查看端口是否已开放/etc/init.d/iptables status centos开放端口/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT/etc/rc.d/init.d/iptables save/etc/rc.d/init ...
分类:
其他好文 时间:
2016-04-13 13:06:18
阅读次数:
132
这篇文章主要介绍了linux下通过iptables只允许指定ip地址访问指定端口的设置方法,需要的朋友可以参考下。 首先,清除所有预设置 其次,设置只允许指定ip地址访问指定端口 上面这两条,请注意--dport为目标端口,当数据从外部进入服务器为目标端口;反之,数据从服务器出去则为数据源端口,使用 ...
分类:
系统相关 时间:
2016-04-11 20:29:17
阅读次数:
195
1:添加3306端口,命令“vi /etc/sysconfig/iptables”,添加“-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT” 重启“service iptables restart”。 2:登录mys ...
分类:
数据库 时间:
2016-04-10 17:56:45
阅读次数:
207
iptables 是Linux 防火墙规则配置命令 iptables -L -n 查看目前配置 iptables -F 清除预设表filter中的所有规则链的规则 iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A OUTPUT -p
分类:
其他好文 时间:
2016-03-18 17:51:24
阅读次数:
122
iptables -A INPUT -p tcp -s 192.168.1.142 --dport 80 -j DROP iptables -I INPUT 4 -p tcp -s 192.168.1.142 --dport 80 -j DROPiptables -D INPUT 4A(append
分类:
系统相关 时间:
2016-02-21 22:39:13
阅读次数:
233
通过命令 netstat -tnl 可以查看当前服务器打开了哪些端口Ssh代码 netstat -tnl 查看防火墙设置Ssh代码 iptables -L -n 开放22、80端口Ssh代码 iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables...
分类:
其他好文 时间:
2016-01-22 21:12:26
阅读次数:
138