RHCE254 2
来源:互联网 发布:mac三国志13战斗卡 编辑:程序博客网 时间:2024/05/17 09:28
sestatus
vim /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
getenforce
setenforce
chcon -t httpd_sys_content index.html
ls -Z
ps ax -Z | grep sendmail
semanage fcontext -a -t httpd_sys_content_t '/var/www/html(/.*)?'
semanage fcontext -l
getsebool -a |grep ftp
setsebool
[root@station3 ~]# setsebool allow_ftpd_anon_write=1
setsebool -P allow_ftpd_anon_write=1 -P 重启保存 一定 -P
semanage fcontext -l grep '/etc/mail(/.*)'
setroubleshootd
tail /var/log/messages
service setroubleshoot status
yum install setroubleshoot -y
chkconfig --list setroubleshoot
service httpd restart
iptables -L --line-number
iptables -D INPUT 1
iptables -I INPUT -s 192.168.0.254
ll /etc/rc.d/iptables
/etc
1.禁止除了 192.168.1.25 主机的 192.168.1.0/24 网络访问本机FTP 服务!
2.禁止202.103.0.117主机来访问本机WEB服务 。(用 --deport 和 --sport写出规则)
3.禁止本机用户访问202.103.0.68的 DNS服务(用 --deport 和 --sport 写出规则)
1. iptables -A INPUT -s 192.168.1.25 -p tcp --deport 21 -j ACCEPT
iptables -A INPORT -s 192.168.1.0/24 -p tcp --deport 21 -j REJECT
2.iptables -A INPUT -s 202.103.0.117 -p tcp --deport 80 -j REJECT
iptables -A OUTPUT -d 202.103.0.117 -p tcp --sport 80 -j REJECT
3.iptables -A OUTPUT -d 202.103.0.68 -p udp --dport 53 -j DROP
iptables -A INPUT -s 202.103.0.68 -p udp --sport 53 -j DROP
iptables -nL 默认链策略
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
iptables -nvL
iptables -N rehe
iptables -L rece
iptables -A rehe -s 192.168.2.0/24 -j ACCEPT
iptables -L rehe
iptables -A INPUT -j rece
iptables -nvl INPUT
iptables -F rhce
iptables -X rhce
- RHCE254 2
- RHCE254 3
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- >2
- 2
- 最新的英语翻译软件《BSC/BIC专业翻译系统》,可以“中译英语/英译中”
- 值得一读的人生哲理
- 揭开.NET消息循环的神秘面纱(一)(转)
- Turbo C 2.0
- 编译篇 彻底玩转 S3C2440 Linux 摄像头 (包括USB和COMS摄像头)
- RHCE254 2
- 设置 Eclipse 智能提示,大幅度减少 alt+/ 使用频率【转】
- Oracle9i中全文检索的创建与使用
- gfdsa
- 2010-SAP 技术教育大会上SAP的新焦点
- 一味追求个人的成功,往往是徒劳的!
- .Net 破解技术
- 如何让普通用户对mount上的硬盘原有分区C盘和D盘以及ext3分区有完全的读写权
- 揭开.NET消息循环的神秘面纱(二)(转)