Quellcode durchsuchen

ipv6 can be used

Bob Mottram vor 8 Jahren
Ursprung
Commit
b9ad7e57a3
2 geänderte Dateien mit 13 neuen und 9 gelöschten Zeilen
  1. 0
    9
      src/freedombone-tests
  2. 13
    0
      src/freedombone-utils-firewall

+ 0
- 9
src/freedombone-tests Datei anzeigen

@@ -577,15 +577,6 @@ function test_stig {
577 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 580
     ##RHEL-06-000099
590 581
     ##The system must ignore ICMPv6 redirects by default.
591 582
     ##If IPv6 is disabled, this is not applicable.

+ 13
- 0
src/freedombone-utils-firewall Datei anzeigen

@@ -178,6 +178,19 @@ function configure_internet_protocol {
178 178
         sed -i "s|#net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
179 179
         sed -i "s|net.ipv4.conf.default.accept_source_route.*|net.ipv4.conf.default.accept_source_route = 0|g" /etc/sysctl.conf
180 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 194
     mark_completed $FUNCNAME
182 195
 }
183 196