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 ...
随机推荐
- MSSQL 字符串替换语句
MSSQL替换语句:update 表名 set 字段名=replace(cast(字段名 as varchar(8000)),'abc.com','123.com')例如:update PE_Arti ...
- shell中if做比较
比较两个字符串是否相等的办法是: if [ "$test"x = "test"x ]; then 这里的关键有几点: 1 使用单个等号 2 注意到等号两边各有一 ...
- CocoaPods报错:The dependency `xxx` is not used in any concrete target
官网是这样给推荐的: 在创建Podfile的时候,用这种格式使用, platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'AFNetw ...
- PHP 类型比较表
以下的表格显示了 PHP 类型和比较运算符在松散和严格比较时的作用.该补充材料还和类型戏法的相关章节内容有关.同时,大量的用户注释和 » BlueShoes 的工作也给该材料提供了帮助. 在使用这些表 ...
- MYSQL Model报错:指定的存储区提供程序在配置中找不到 的解决
开了项目发现没装mysql及mysql connector/.net.下了个最新版本,结果打开vs,进入模型edmx页面就出了这个问题. 刚开始以为是ProviderManifestToken版本的问 ...
- DSP TMS320C6000基础学习(6)—— gel文件
什么是gel文件?gel文件能干什么? gel全称General Extended Language,即通用扩展语言文件,gel文件中由类似C语言的代码构成,gel语言是一种解释性语言,gel文件扩展 ...
- EcStore操作笔记
1.去掉首页里面代码: <meta http-equiv="content-type" content="text/html; charset=utf-8" ...
- CSS样式鼠标点击与经过的效果一样
a:link /* 未访问的链接 */ a:visited /* 已访问的链接 */ a:hover /* 当有鼠标悬停在链接上 */ a:active /* 被选择的链接 */ a,a:visite ...
- jdbc接口api
java.sql.* 和 javax.sql.* |- Driver接口: 表示java驱动程序接口.所有的具体的数据库厂商要来实现此接口. |- connect(url, properties): ...
- 文本框Edit
支持换行就要把 Multiline 设置为TRUE Edit窗口是用来接收用户输入最常用的一个控件.创建一个输入窗口可以使用成员函数: BOOL CEdit::Create( LPCTSTR lpsz ...