December 2018
Beginner
826 pages
22h 54m
English
By default, SSH will listen on all addresses and interfaces:
#AddressFamily any#ListenAddress 0.0.0.0#ListenAddress ::
We're going to change this so that it's listening on only IPv4 and our eth1 address.
Change the preceding options to the following:
AddressFamily inetListenAddress 192.168.33.11#ListenAddress ::
We've uncommented two of the options and changed their values.
Restart the SSH daemon:
[vagrant@centos2 ~]$ sudo systemctl restart sshd
Running our ss command from before, you may notice that the IPv6 option has disappeared:
[vagrant@centos2 ~]$ ss -nl sport = :2222Netid ...
Read now
Unlock full access