重庆思庄技术分享——ORACLE 19c RAC防火墙设置

ORACLE 19c RAC防火墙设置

--1.最核心的部分

--增加公网
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.133.0/24" accept'
--增加私网
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/16" accept'
--增加haip
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="169.254.0.0/16" accept'



--2.可以缩小范围,具体的IP
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.133.203/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.133.204/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.133.254/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.133.253/32" accept'

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.203/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.1.203/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.2.203/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.204/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.1.204/32" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.2.204/32" accept'

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="169.254.0.0/16" accept'

--3.取消规则
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.0.203/32" accept'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.1.203/32" accept'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.2.203/32" accept'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.0.204/32" accept'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.1.204/32" accept'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="10.0.2.204/32" accept'

--4.生效

firewall-cmd --reload



#在主机防火墙上添加漏扫设备地址10.100.109.225为白名单
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.100.109.225" accept
#允许备份服务器ssh访问数据库
firewallcmd --permanent -add-rich-rule='rule family="ipv4" source address="10.100.109.148/32" port protocol="tcp" port="22" accept
#允许深信服堡垒机ssh访问数据库
firewa-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.101.140.253/32" port protocol="tcp" port="22" accept
#允许应用服务器访问
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.100.194.0/24" accept

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值