Skip to content

学习笔记

此博客用于个人学习的时候做一下笔记

  • 主页
  • golang
  • linux
  • nginx
  • php
  • python
  • vue
  • 杂项
by: adminPosted on: 2024-02-292024-02-29

centos7防火墙拒绝出站流量

firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m state --state ESTABLISHED,RELATED -j ACCEPT 

firewall-cmd --direct --add-rule ipv4 filter OUTPUT 2 -j DROP

firewall-cmd --reload

#查看规则
firewall-cmd --direct --get-all-rules

参考资料
https://serverfault.com/questions/618164/block-outgoing-connections-on-rhel7-centos7-with-firewalld

https://unix.stackexchange.com/questions/755756/using-zones-in-firewalld-to-block-outbound-access

https://superuser.com/questions/1391650/how-can-i-configure-firewalld-to-block-all-outgoing-traffic-except-for-specific

linux

文章导航

Previous PostPrevious centos搭建 shadowsockets
Next PostNext centos7手动编译安装nginx与php

近期文章

  • 20240505学习python_scrapy框架_基础
  • 20240428学习Python_文件处理
  • 20240428学习Python_杂项
  • 20240428学习Python_面向对象
  • 20240428学习Python_基础

归档

  • 2024 年 5 月
  • 2024 年 4 月
  • 2024 年 3 月
  • 2024 年 2 月

分类目录

  • golang
  • linux
  • nginx
  • php
  • python
  • 杂项
Theme Twelve Blog by Kantipur Themes