How to disable IPv6 on Debian Stretch 9.1 ?
change: /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
change: /proc/sys/net/ipv6/conf/all/disable_ipv6 to 1
result:
# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2594/sshd
tcp6 0 0 :::22 :::* LISTEN 2594/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 2560/dhclient
udp 0 0 172.16.0.55:123 0.0.0.0:* 2650/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2650/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2650/ntpd
udp 0 0 0.0.0.0:8472 0.0.0.0:* -
udp6 0 0 :::123 :::* 2650/ntpd