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
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# 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

vm.swappiness=0

sudo sysctl -p /etc/sysctl.conf

sudo vi /etc/ssh/sshd_config

AddressFamily inet

sudo service ssh restart

You may also like...