Skip to content

Commit

Permalink
Add tests for network_implement_access_control
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Ramirez <federico.r.ramirez@oracle.com>
  • Loading branch information
freddieRv committed May 29, 2023
1 parent f63036b commit a3d5cb6
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# packages = firewalld

systemctl enable firewalld
systemctl start firewalld

firewall-cmd --set-default-zone=public

firewall-cmd --permanent \
--zone=public \
--add-source="192.168.122.25" \
--add-source="192.168.122.28"

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# packages = firewalld

systemctl enable firewalld
systemctl start firewalld

firewall-cmd --permanent --new-zone=myzone
firewall-cmd \
--permanent \
--zone=myzone \
--add-service="ssh" \
--add-service="dhcp"

systemctl restart firewalld

firewall-cmd --set-default-zone=myzone
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# packages = firewalld

systemctl stop firewalld
systemctl disable firewalld

echo "192.168.122.25" >> /etc/hosts.allow
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# packages = firewalld

systemctl stop firewalld
systemctl disable firewalld

echo "192.168.122.25" >> /etc/hosts.deny
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# packages = firewalld
# remediation = none

systemctl stop firewalld
systemctl disable firewalld

truncate -s 0 /etc/hosts.{allow,deny}

0 comments on commit a3d5cb6

Please sign in to comment.