0

How does one disable an IPv6 TCP connection?

It seems like it should be easy. The only solution I found is a new effort that has a lot of potential, but needs to be developed further to be used as a de facto drop-in for tcpkill.

So, to clarify: how does one block IPv6 TCP connections with existing Debian packages?


In the interim, although I don't think it is the ideal solution, how do you disable IPv6 TCP connections entirely?

1 Answer 1

-3

To disable IPv6 permanently :

open editor with sudo nano /etc/sysctl.conf

Add the following at the bottom of the file:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

In case to change it only temporarily use:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Replace 1 with 0 to enable it again

5
  • 2
    The OP is asking about terminating individual connections, not disabling the entire IPv6 stack. Jul 12, 2020 at 3:49
  • Well, I guess I missed that. Sorry about that. Should I delete that answer?
    – kanehekili
    Jul 12, 2020 at 20:26
  • @kanehekili hold on, let's salvage this post over time. Do you mind un-deleting this, and I'll supplement with a follow-up. Perhaps I can edit my question so that yours fits, for now.
    – Chris
    Jul 13, 2020 at 11:38
  • @kanehekili I'll delete my answer where I copied over your content in a sec, didn't want to lose it, in case you delete it :)
    – Chris
    Jul 13, 2020 at 11:43
  • According to this I shouldn't delete the question and I won't. It is off-topic but might help people in similar circumstances... @Christopher - you might remove the copy.
    – kanehekili
    Jul 13, 2020 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .