linux防火墙开启-关闭
1、永久性生效,重启后不会复原
开启: chkconfig iptables on
关闭: chkconfig iptables off
2、 即时生效,重启后复原
开启: service iptables start
关闭: service iptables stop
3、查看防火墙状态
service iptables status 查看iptables状态
=================
防火墙开放端口:10051、10050、80
open your firewall ports on client and serverside!!
10051 for trapper
10050 for client
80 for httpd
This can be done easy by adding these lines in iptables
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
restart the firewall
service iptables restart
=======================
RHEL7启动关闭防火墙:
# systemctl status firewalld
# systemctl start/stop firewalld --重启系统后失效
# systemctl enable/disable firewalld --重启后也生效
linux防火墙开启-关闭的更多相关文章
- Linux防火墙开启关闭查询
1.centos7防火墙 命令含义: –zone #作用域 –add-port=80/tcp #添加端口,格式为:端口/通讯协议 –permanent #永久生效,没有此参数重启后失效 服务与端口的启 ...
- Linux下开启关闭防火墙
一.Linux下开启/关闭防火墙命令 1) 永久性生效,重启后不会复原 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重 ...
- CentOs7 使用iptables防火墙开启关闭端口
CentOs7 使用iptables防火墙开启关闭端口 # 0x01介绍 iptables命令是Linux上常用的防火墙软件,是netfilter项目的一部分iptables文件设置路径:命令:v ...
- linux 防火墙开启80端口永久保存
经常使用CentOS的朋友,可能会遇到和我一样的问题.开启了防火墙导致80端口无法访问,刚开始学习centos的朋友可以参考下.经常使用CentOS的朋友,可能会遇到和我一样的问题.最近在Linux ...
- 一 SSH 无密码登陆 & Linux防火墙 & SELinux关闭
如果系统环境崩溃. 调用/usr/bin/vim /etc/profile SHH无密码登陆 所有要做得节点上运行 修改 host name vi /etc/sysconfig/netwo ...
- Linux防火墙的关闭和开启
1) 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重启后失效 开启: service iptables sta ...
- Linux防火墙的关闭和开启(转)
1) 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重启后失效 开启: service iptables sta ...
- 【linux系列】linux防火墙的关闭开启
即时生效 开启:service iptables start 关闭:service iptables stop 重启后生效 开启:chkconfig iptables on 关闭:chkconfig ...
- Linux下开启关闭SeLinux
SELinux (Security-Enhanced Linux) in Fedora is an implementation of mandatory access control in the ...
随机推荐
- VC Windows系统服务创建代码
Windows系统服务创建步骤,常用类封装,废话不多说,直接上代码 // ServceDemo.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" ...
- sql server备份相关
本文转载自http://dreamfire.blog.51cto.com/418026/152075/ 感谢作者的分享!! 数据库没有备份---应如何还原丢失的数据 环境描述: 某公司装了一台 ...
- 原生js实现的放大镜效果
这是我用原生js写的放大镜效果,与各种各样的框架技术相比,我喜欢使用原生的js,在这里,想和大家一起谈谈原生和框架技术的理解与个人喜好. <!DOCTYPE HTML><html&g ...
- web项目环境搭建(3):搭建Spring+MyBatis
spring 4.1.7 + MyBatis 3.3 正式开始配置关键内容,这是硬货 一. 新建spring配置文件,起名为 applicationContext.xml,放在src/main/res ...
- Caused by: java.lang.NullPointerException, java.lang.reflect.InvocationTargetExc
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M ...
- 手写总结:synchronized 和 lock 区别
1. synchronized 是jvm 层次的(可以会造成死锁), lock 可以写代码控制,一般在异常时在 finally 里可以 unlock 释放锁 2. lock 细度更细,synchro ...
- php global范例
Example #1 $GLOBALS 范例 <?phpfunction test() { $foo = "local variable"; echo '$foo in ...
- 一个使用CSocket类的网络通信实例
http://www.cppblog.com/changshoumeng/archive/2010/05/14/115413.html 3.8 一个使用CSocket类的网络通信实例 本例采用CSoc ...
- linux下实现rm()函数删除文件或目录
转载请注明原创:http://www.cnblogs.com/StartoverX/p/4600866.html 在linux下有两个函数可以用来删除文件: #include <unistd.h ...
- START WITH CONNECT BY PRIOR 链表查询
使用场景:排序 设计思路,id为主键,index为顺序,index存前一个节点的id,当然,按照这个思路可以实现双向链表的(preindex存前一个节点,nextindex存下一个节点) 这样的话排序 ...