iptables 开放80端口以及删除80端口的规则
[root@zabbix-server html]# iptables --version
iptables v1.4.21 [root@zabbix-server html]# iptables -I INPUT -p tcp --dport -j ACCEPT
[root@zabbix-server html]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@zabbix-server html]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ 确定 ]
测试访问

删除刚刚添加的80端口
[root@zabbix-server html]# iptables -D INPUT -p tcp --dport -j ACCEPT
[root@zabbix-server html]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT)
target prot opt source destination [root@zabbix-server html]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ 确定 ]
测试访问

iptables 开放80端口以及删除80端口的规则的更多相关文章
- [转载]CENTOS 6.0 iptables 开放端口80 3306 22端口
原文地址:6.0 iptables 开放端口80 3306 22端口">CENTOS 6.0 iptables 开放端口80 3306 22端口作者:云淡风轻 #/sbin/iptab ...
- Iptables 防火墙开放常见的22,53,80端口
用iptables防火墙 iptables -F # 允许包从22端口进入 iptables -A INPUT -p tcp --dport 22 -j ACCEPT # 允许从22端口进入的包返回 ...
- (转载)CentOS: 开放80、22、3306端口操作
(转载)http://blog.sina.com.cn/s/blog_3eba8f1c0100tsox.html #/sbin/iptables -I INPUT -p tcp --dport 80 ...
- 【转】CentOS: 开放80、22、3306端口操作
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT#/sbin/iptables -I INPUT -p tcp --dport 22 -j AC ...
- CentOS7防火墙开启与关闭以及开放6379,3306,80等端口
CentOS7用firewall防火墙替代了原来的iptables,所以我们应该使用firewall的一些命令.如下:1.关闭防火墙 systemctl stop firewalld.service ...
- centos7防火墙iptables开放常用端口
清除所有规则: iptables -F 开放常用tcp端口: iptables -I INPUT -p tcp -m multiport --dports 20,21,22,3690,80,443,4 ...
- linux将80端口映射到指定端口命令
1.添加一个端口映射 将80端口映射到8088端口命令如下: iptables -t nat -I PREROUTING -p tcp --dport 80-j REDIRECT --to-port ...
- Linux中使用iptables开放特定端口
禁止其他主机对该特定主机进行访问和远程连接控制,所以只开放特定端口 只控制INPUT链就可达到控制其他主机对该主机的访问. 1.首先关闭INPUT链 iptables -P INPUT DROP 使用 ...
- docker上部署nginx容器80端口自动转443端口
拉去nginx镜像 # docker pull nginx 运行nginx容器config用于拷贝nginx配置文件 # docker run --name nginxconfig -d docker ...
随机推荐
- lambda concurrent List<Map> to Map
Object c = Stream.of( CompletableFuture.supplyAsync(() -> { Map m = new HashMap(); try { Thread.s ...
- Python图形验证码识别
一,OCR OCR,即Optical Character Recognition,光学字符识别,通过扫描字符,分析形状,然后将其翻译成电子文本的过程.tesserocr是Python的一个OCR识别库 ...
- 功能区按钮调用Excel、PowerPoint、Word中的VBA宏:RunMacro
功能区按钮调用Excel.PowerPoint.Word中的VBA宏:RunMacro 众所周知,Excel.PPT.Word文档或加载宏文件中可以写很多过程和函数,调试的过程中当然可以按F8或F5直 ...
- Nmap_使用介绍
Nmap 注意,本文仅是作为课余时间的学习了解,请不要做有关违反法律法规的事情,违者自行承担后果!!! 环境centos7.7yum -y install nmap 命令操作 1.扫描单个目标 1. ...
- 二十六、linux邮件服务器
1.安装: yum install -y sendmail 因为是最小安装,需要包没有安装 yum install -y mailx 2.日志:/var/log/maillog 3.启动:/etc ...
- mui折叠面板的使用
折叠面板从二级列表中演化而来,dom结构和二级列表类似,如下: <div class="mui-content"> <div class="mui-ca ...
- PhpMyadmin各版本漏洞合集
1.PhpMyAdmin存在PREGREPLACEEVAL漏洞 影响版本: 3.5.x < 3.5.8.1 and 4.0.0 < 4.0.0-rc3 利用模块: exploit/mult ...
- Qt 信息提示框 QMessageBox
information QMessageBox::information(NULL, "Title","Content",QMessageBox::Yes | ...
- spring cloud关于feign client的调用对象列表参数、设置header参数、多环境动态参数试配
spring cloud关于feign client的调用 1.有些场景接口参数需要传对象列表参数 2.有些场景接口设置设置权限等约定header参数 3.有些场景虽然用的是feign调用,但并不会走 ...
- cnn可视化 感受野(receptive field)可视化
网址: https://befreeroad.github.io/#/editor 参考: http://ethereon.github.io/netscope/#/editor 在此基础上添加 感受 ...