ssh ipv4 only
Disable ipv6 on ssh
I don’t like ipv6, so I disable the service stacks that use ipv6 (I do not disable ipv6 though because that will cause other problems)
Verify IPv6 Services
ubuntu@perfectvacationpackages:~$ netstat -plunt
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
SSHD settings
Modify this to file to disable ssh over ipv6:
sudo vim /etc/ssh/sshd_config
ListenAddress 0.0.0.0
sudo service ssh restart
Verify IPv6 Services again
ubuntu@perfectvacationpackages:~$ netstat -plunt
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -