iptables配置(/etc/sysconfig/iptables)操作方法

作者:jingxian 时间:2022-08-25 01:06:09 

如下所示:

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT

#保存

sudo /etc/rc.d/init.d/iptables save

sudo service iptables save

#重启iptables

sudo service iptables restart

#查看

sudo iptables --line-numbers -n -L

#关闭防火墙

sudo service iptables stop

sudo chkconfig iptables off

sudo service ip6tables stop

sudo chkconfig ip6tables off

sudo setenforce 0

sudo getenforce

#查看 vi /etc/selinux/config 确保以下内容

SELINUX=disabled

#查看是否是关闭。

sudo chkconfig iptables --list

标签:etc,sysconfig,iptables,iptables,配置
0
投稿

猜你喜欢

  • 巧用Windows监控FTP空间不足

    2007-03-26 14:33:00
  • 解决IIS下UTF-8文件报错乱码的问题

    2008-08-22 13:47:00
  • 什么是Google分析师?

    2008-01-22 12:41:00
  • SimpleServer:WWW 傻瓜式Web服务器

    2010-05-26 18:19:00
  • 美图秀秀2.0.1 超强瘦脸瘦身再优化

    2009-10-16 15:48:00
  • 适度合理化增加你的google adsense广告点击

    2008-08-15 18:51:00
  • Win空间上如何实现WordPress博客的完美伪静态

    2011-07-27 18:21:48
  • 知己知彼 分析竞争对手的网站来赢得胜利

    2008-11-28 09:48:00
  • 修改z-blog侧栏JS调用

    2010-09-25 13:03:00
  • Linux和Unix最常用的网络命令

    2008-01-27 15:22:00
  • IIS服务器排错指南及错误代码大全

    2007-08-13 15:16:00
  • 从TCP/IP模型全面认识FTP

    2009-12-10 19:16:00
  • 2008年RSS订阅最多的30个顶尖SEO博客

    2009-02-16 10:52:00
  • 谷歌广告官方博客:博客中谷歌广告的禁忌

    2009-01-06 12:54:00
  • 免费开源微博客程序一览

    2009-07-30 12:54:00
  • 如何在Linux服务器上设置DNS

    2007-12-14 09:57:00
  • Mac通过不同终端SSH连接远程服务器的讲解

    2023-07-14 22:41:42
  • Windows中IIS内FTP服务器高级配置

    2009-05-19 09:16:00
  • 盘点五个最具有中国风土文化特色的网页游戏

    2009-10-22 09:52:00
  • linux中误删除程序包恢复实例

    2023-07-15 16:07:25
  • asp之家 网站运营 m.aspxhome.com