Disable IPV6 Debian

sudo vi /etc/sysctl.conf

# to disable IPv6 on all interfaces system wide
net.ipv6.conf.all.disable_ipv6 = 1

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks

# Do not accept ICMP redirects (prevent MITM attacks)
net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0

# Do not send ICMP redirects (we are not a router)
net.ipv4.conf.all.send_redirects = 0

# Do not accept IP source route packets (we are not a router)
net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0


sudo sysctl -p /etc/sysctl.conf

sudo vi /etc/ssh/sshd_config

AddressFamily inet

sudo service ssh restart

You may also like...