This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| iscsi_centos7 [2015/08/22 10:38] – herwarth | iscsi_centos7 [2015/08/22 10:46] (current) – herwarth | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| < | < | ||
| - | yum install targetcli net-tools wget chrony | + | rpm -ivh https:// |
| + | yum install targetcli net-tools wget chrony | ||
| + | |||
| wget https:// | wget https:// | ||
| sh ./ | sh ./ | ||
| Line 70: | Line 72: | ||
| /> | /> | ||
| </ | </ | ||
| + | saveconfig | ||
| + | exit | ||
| + | systemctl enable target | ||
| + | systemctl start target | ||
| + | |||
| + | =====Firewalld===== | ||
| + | Remove default crap | ||
| + | < | ||
| + | firewall-cmd --permanent --zone=home --remove-service=dhcpv6-client | ||
| + | firewall-cmd --permanent --zone=home --remove-service=ipp-client | ||
| + | firewall-cmd --permanent --zone=home --remove-service=mdns | ||
| + | firewall-cmd --permanent --zone=home --remove-service=samba-client | ||
| + | firewall-cmd --permanent --zone=home --remove-service=ssh | ||
| + | firewall-cmd --permanent --zone=internal --remove-service=dhcpv6-client | ||
| + | firewall-cmd --permanent --zone=internal --remove-service=ipp-client | ||
| + | firewall-cmd --permanent --zone=internal --remove-service=mdns | ||
| + | firewall-cmd --permanent --zone=internal --remove-service=samba-client | ||
| + | firewall-cmd --permanent --zone=internal --remove-service=ssh | ||
| + | firewall-cmd --permanent --zone=work --remove-service=dhcpv6-client | ||
| + | firewall-cmd --permanent --zone=work --remove-service=ipp-client | ||
| + | firewall-cmd --permanent --zone=work --remove-service=ssh | ||
| + | firewall-cmd --permanent --zone=public --remove-service=dhcpv6-client | ||
| + | firewall-cmd --permanent --zone=public --remove-service=ssh | ||
| + | firewall-cmd --permanent --zone=external --remove-service=ssh | ||
| + | firewall-cmd --permanent --zone=external --remove-masquerade | ||
| + | firewall-cmd --permanent --zone=dmz --remove-service=ssh | ||
| + | </ | ||
| + | Create new zones | ||
| + | < | ||
| + | firewall-cmd --permanent --new-zone=management | ||
| + | firewall-cmd --permanent --new-zone=local | ||
| + | firewall-cmd --permanent --new-zone=iscsi1 | ||
| + | firewall-cmd --permanent --new-zone=iscsi2 | ||
| + | </ | ||
| + | Put subnets in zones | ||
| + | < | ||
| + | firewall-cmd --permanent --zone=public --add-source=0.0.0.0/ | ||
| + | firewall-cmd --permanent --zone=public --add-source=::/ | ||
| + | |||
| + | firewall-cmd --permanent --zone=dmz --add-source=5.200.9.240/ | ||
| + | firewall-cmd --permanent --zone=dmz --add-source=2a00: | ||
| + | firewall-cmd --permanent --zone=dmz --add-source=46.44.183.176/ | ||
| + | firewall-cmd --permanent --zone=dmz --add-source=2a02: | ||
| + | firewall-cmd --permanent --zone=dmz --add-source=94.142.242.32/ | ||
| + | firewall-cmd --permanent --zone=dmz --add-source=2a02: | ||
| + | |||
| + | firewall-cmd --permanent --zone=local --add-source=172.16.3.0/ | ||
| + | firewall-cmd --permanent --zone=local --add-source=2a02: | ||
| + | firewall-cmd --permanent --zone=local --add-source=172.16.5.0/ | ||
| + | firewall-cmd --permanent --zone=local --add-source=2a00: | ||
| + | firewall-cmd --permanent --zone=local --add-source=172.16.7.0/ | ||
| + | firewall-cmd --permanent --zone=local --add-source=2a02: | ||
| + | |||
| + | firewall-cmd --permanent --zone=management --add-source=172.16.2.0/ | ||
| + | firewall-cmd --permanent --zone=management --add-source=2a02: | ||
| + | firewall-cmd --permanent --zone=management --add-source=172.16.4.0/ | ||
| + | firewall-cmd --permanent --zone=management --add-source=2a00: | ||
| + | firewall-cmd --permanent --zone=management --add-source=172.16.6.0/ | ||
| + | firewall-cmd --permanent --zone=management --add-source=2a02: | ||
| + | |||
| + | firewall-cmd --permanent --zone=iscsi1 --add-source=192.168.0.0/ | ||
| + | firewall-cmd --permanent --zone=iscsi2 --add-source=192.168.1.0/ | ||
| + | </ | ||
| + | Add services | ||
| + | <code - / | ||
| + | <?xml version=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <port protocol=" | ||
| + | </ | ||
| + | </ | ||
| + | <code - / | ||
| + | <?xml version=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <port protocol=" | ||
| + | </ | ||
| + | </ | ||
| + | Add services to zones | ||
| + | < | ||
| + | firewall-cmd --permanent --zone=management --add-service=ssh | ||
| + | firewall-cmd --permanent --zone=local --add-service=ssh | ||
| + | |||
| + | firewall-cmd --permanent --zone=iscsi1 --add-service=iscsi-target | ||
| + | firewall-cmd --permanent --zone=iscsi2 --add-service=iscsi-target | ||
| + | |||
| + | firewall-cmd --permanent --zone=management --add-rich-rule=" | ||
| + | source address=" | ||
| + | firewall-cmd --permanent --zone=management --add-rich-rule=" | ||
| + | source address=" | ||
| + | </ | ||
| + | |||
| + | Make sure all interfaces are set to public as default! | ||
| + | firewall-cmd --set-default-zone=public | ||
| + | firewall-cmd --reload | ||
| + | |||
| {{tag> | {{tag> | ||