Bob Mottram 8 anni fa
parent
commit
b9ad7e57a3
2 ha cambiato i file con 13 aggiunte e 9 eliminazioni
  1. 0
    9
      src/freedombone-tests
  2. 13
    0
      src/freedombone-utils-firewall

+ 0
- 9
src/freedombone-tests Vedi File

577
     output "V-38544" $? ${SETLANG}
577
     output "V-38544" $? ${SETLANG}
578
     ################
578
     ################
579
 
579
 
580
-    ##RHEL-06-000098
581
-    ##The IPv6 protocol handler must not be bound to the network stack unless needed.
582
-
583
-    bash $STIG_TESTS_DIR/check-ipv6-enable.sh >/dev/null 2>&1 &
584
-
585
-    stig_spinner $!
586
-    output "V-38546" $? ${SETLANG}
587
-    ################
588
-
589
     ##RHEL-06-000099
580
     ##RHEL-06-000099
590
     ##The system must ignore ICMPv6 redirects by default.
581
     ##The system must ignore ICMPv6 redirects by default.
591
     ##If IPv6 is disabled, this is not applicable.
582
     ##If IPv6 is disabled, this is not applicable.

+ 13
- 0
src/freedombone-utils-firewall Vedi File

178
         sed -i "s|#net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
178
         sed -i "s|#net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
179
         sed -i "s|net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
179
         sed -i "s|net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
180
     fi
180
     fi
181
+    if ! grep -q "net.ipv4.conf.default.secure_redirects" /etc/sysctl.conf; then
182
+        echo "net.ipv4.conf.default.secure_redirects = 0" >> /etc/sysctl.conf
183
+    else
184
+        sed -i "s|#net.ipv4.conf.default.secure_redirects.*|net.ipv4.conf.default.secure_redirects = 0|g" /etc/sysctl.conf
185
+        sed -i "s|net.ipv4.conf.default.secure_redirects.*|net.ipv4.conf.default.secure_redirects = 0|g" /etc/sysctl.conf
186
+    fi
187
+    net.ipv4.conf.default.accept_redirects = 0
188
+    if ! grep -q "net.ipv4.conf.default.accept_redirects" /etc/sysctl.conf; then
189
+        echo "net.ipv4.conf.default.accept_redirects = 0" >> /etc/sysctl.conf
190
+    else
191
+        sed -i "s|#net.ipv4.conf.default.accept_redirects.*|net.ipv4.conf.default.accept_redirects = 0|g" /etc/sysctl.conf
192
+        sed -i "s|net.ipv4.conf.default.accept_redirects.*|net.ipv4.conf.default.accept_redirects = 0|g" /etc/sysctl.conf
193
+    fi
181
     mark_completed $FUNCNAME
194
     mark_completed $FUNCNAME
182
 }
195
 }
183
 
196