linux系统 centos中iptables使用教程
2020-06-03 04:54
363 查看
linux系统 centos中iptables使用教程
1、简单命令介绍
//查看防火墙状态
service iptables status
# 启动iptables防火墙 service iptables start
#停止iptables防火墙 service iptables stop
#重启iptables防火墙 ,并加载配置文件 service iptables restart
#永久iptables关闭防火墙 chkconfig iptables off
#永久关闭iptables后重启 chkconfig iptables on
2.开启防火墙其他端口,示例如下:
#使用vim指令打开iptables的配置文件 vim /etc/sysconfig/iptables #追加下面文字到iptables配置文件中如图所示 -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
#保存iptables文件并退出 !wq #执行如下指令重启iptables防火墙 [root@host-10-19-83-74 ~]# service iptables restart
相关文章推荐
- Linux(Ubantu,Centos) 命令、系统使用、教程汇总[不定期更新]
- Linux系统Iptables防火墙使用手册
- linux vps CentOS LNMP系统上directadmin的完整安装教程
- 给VM虚拟机中的CentOS Linux系统挂载U盘的方法图文教程
- linux系统下,使用dd命令制作U盘安装系统教程
- 在Linux 系统 Latex安装 使用入门教程
- windows系统使用Tera Term连接虚拟机(VMware Workstation) 中的Linux(CentOS)
- 阿里云CentOS 7系统挂载SSD云盘的教程_Linux
- linux系统(centos)下安装JDK,Tomcat详细教程!!!
- 华立学院使用Linux系统认证网络教程
- Linux系统中uniq命令的基本使用教程
- 1.1 使用虚拟机搭建linux系统centos7,以及相关操作。
- 使用EasyBCD实现Windows7与Linux双系统的详细教程
- 使用YUM在Linux(CentOS 7)下安装mysql 5.7.18的教程详解
- Linux系列教程(二)——Linux系统安装(手把手学安装centos6.8)
- Linux系统中sort排序命令的使用教程
- GoAgent_Linux Linux/Mac OSX系统使用教程
- Linux系统之工具篇(一)DRBD 单双主模式区别详解,Centos6.5(64bit)与nfs文件系统使用结合测试
- 在Linux系统中使用tar命令压缩和解压文件的教程
- XP系统下用虚拟机安装centos 5.6(Linux系统)图文教程(二)—“linux优化配置”