I'm running Ubuntu 10.4 and I've tried disabling IPv6 as I don't currently need it. I rand the following to disable IPv6 and then rebooted my server:
echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
After the reboot I can see that IPv& is disabled by running:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
On running netstat -antlp i see that most of the IPv6 applications have closed but SSHd keeps running:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 663/java
tcp 0 0 0.0.0.0:9091 0.0.0.0:* LISTEN 663/java
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 684/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 513/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 605/postgres
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 684/apache2
tcp6 0 0 :::22 :::* LISTEN 513/sshd
Ho can I close the SSH daemon on port 22 of the IPv6?
Thanks.