solaris 系统防火墙设置 传输文件
Solaris系统文件传输操作指南登录前准备:检查防火墙规则确保SSH访问许可,包括10.26.210.14、172.22.164.11等白名单IP。防火墙操作:查看状态:svcs ipfilter/ipfstat -io临时关闭:svcadm disable ipfilter永久配置:编辑/etc/ipf/ipf.conf添加/修改规则后,使用ipf -F all和ipf -f命令加载新规则文件
·
solaris 系统防火墙设置 传输文件
1.登录系统
pass in quick on ipmp0 proto tcp from 10.26.210.14/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 172.22.164.11/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 10.25.130.0/24 to any port = ssh
block in quick on ipmp0 proto tcp from any to any port = ssh
2.关闭防火墙
#查看防火墙服务状态:
svcs ipfilter
#查看防火墙的详细信息
ipfstat -io
empty list for ipfilter(out)
pass in quick on ipmp0 proto tcp from 10.26.210.14/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 172.22.164.11/32 to any port = ssh
block in quick on ipmp0 proto tcp from any to any port = ssh
#关闭防火墙
svcadm disable ipfilter
#查看防火墙服务状态:
svcs ipfilter
3.传输文件
cd /soft/tmp/nvoi/qualif
scp 20250221073131drlfoqa2.dat 20250221073135drlfoqa1.dat root@10.25.130.192:/soft/
4.授权文件
登录到10.25.130.192
cd /soft
chmod 755 /soft/2025*
5.下载
6.开启防火墙
svcadm enable ipfilter
7.编辑防火墙
#启用防火墙
svcadm enable ipfilter
#查看 ipfilter 状态
svcs ipfilter
#查看 ipfilter 规则
ipfstat -io
#查看 ipfilter 统计信息
ipfstat -s
#查看 ipfilter 日志
cat /var/log/ipflog
#查看网络接口
ifconfig -a
#编辑防火墙规则
vi /etc/ipf/ipf.conf
pass in log quick proto tcp from any to any port = 60679 flags S/FSRPAU keep state
pass in quick on ipmp0 proto tcp from 10.26.210.14/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 172.22.164.11/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 10.25.130.192/32 to any port = ssh
block in quick on ipmp0 proto tcp from any to any port = ssh
#
# ipf.conf
#
# IP Filter rules to be loaded during startup
#
# See ipf(4) manpage for more information on
# IP Filter rules syntax.
pass in quick on ipmp0 proto tcp from 10.26.210.14/32 to any port = ssh
pass in quick on ipmp0 proto tcp from 172.22.164.11/32 to any port = ssh
#drop里面的虚拟机IP
pass in quick on ipmp0 proto tcp from 10.25.130.0/24 to any port = ssh
block in quick on ipmp0 proto tcp from any to any port = ssh
#应用防火墙规则
#需要开启防火墙,否则会出现 ioctl(SIOCIPFFL): I/O error
svcadm enable ipfilter
ipf -F all # 刷新所有现有的规则
ipf -f /etc/ipf/ipf.conf # 加载新配置
更多推荐
所有评论(0)