CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了centos – 阻止认证uid的传出连接(root,apache,nobody)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

使用CentOS 5和6 Linux中的iptables – 如何防止以root用户,apache或无人启动的进程启动传出连接? 在CentOS 5 Linux上,我尝试将这些行放入/ etc / sysconfig / iptables: -A OUTPUT -m owner --uid-owner root -j DROP -A OUTPUT -m owner --uid-owner apac
使用CentOS 5和6 Linux中的iptables – 如何防止以root用户,apache或无人启动的进程启动传出连接? @H_262_15@在CentOS 5 Linux上,我尝试将这些行放入/ etc / sysconfig / iptables:@H_450_16@
-A OUTPUT -m owner --uid-owner root -j DROP
-A OUTPUT -m owner --uid-owner apache -j DROP
-A OUTPUT -m owner --uid-owner nobody -j DROP
@H_262_15@但不幸的是得到错误:@H_450_16@
# sudo service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: SetTing chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: iptables-restore v1.4.7: owner: Bad value for "--uid-owner" option: "apache"
Error occurred at line: 27
Try `iptables-restore -h' or 'iptables-restore --Help' for more information.
                                                           [Failed]
尝试使用数字UID而不是名称.例如:
-A OUTPUT -m owner --uid-owner 400 -j DROP
@H_262_15@代替@H_450_16@
-A OUTPUT -m owner --uid-owner apache -j DROP
@H_262_15@您可以通过键入找到UID@H_450_16@
id user

大佬总结

以上是大佬教程为你收集整理的centos – 阻止认证uid的传出连接(root,apache,nobody)全部内容,希望文章能够帮你解决centos – 阻止认证uid的传出连接(root,apache,nobody)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。