selinux打开samba权限

配置SELINUX

1
chcon -t samba_share_t [path/to/share]

## 配置iptables

1
2
3
4
iptables -I INPUT 3 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT && \
iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 139 -j ACCEPT && \
iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT && \
iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT

PS: 注意修改插入位置