Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit 0b0c9f3

Browse files
no ipv6
- IPv6 Traffic disabled
1 parent 8722eb5 commit 0b0c9f3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎bin/darknet.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,18 @@ def __check_if_linux(self) -> None:
189189
"""
190190
if "linux" not in sys.platform:
191191
raise UnsupportedOS("You need a Linux distro to run this program")
192+
193+
def __noipv6(self) -> None:
194+
"""
195+
Disables Kernel IPv6 Forwarding
196+
197+
Returns
198+
-------
199+
None
200+
201+
"""
202+
subprocess.call(shlex.split("sysctl -w net.ipv6.conf.all.disable_ipv6=1"))
203+
subprocess.call(shlex.split("sysctl -w net.ipv6.conf.default.disable_ipv6=1"))
192204

193205
def __ip4f(self) -> None:
194206
"""
@@ -637,6 +649,7 @@ def start(self, args) -> None:
637649

638650
print("Hardering System...")
639651
self.__ip4f()
652+
self.__noipv6()
640653
self.__icmp()
641654
self.__mtp()
642655
print("{} Checking for SELinux".format(self._timer))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /