forked from infra/ansible
basessh: Use ListenAddress on hosts with secondary addresses.
If a host has a secondary ipv4 or ipv6 address, only have sshd listen on the primary ip. This will allow hosts with secondary ips to use ssh port on secondary ip's for other things. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
c9b56e6358
commit
6a624f306b
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,12 @@
|
|||
Protocol 2
|
||||
|
||||
Port {{ sshd_port }}
|
||||
{% if eth0_secondary_ipv4_ip is defined %}
|
||||
ListenAddress {{ eth0_ipv4_ip }}
|
||||
{% endif %}
|
||||
{% if eth0_secondary_ipv6_ip is defined %}
|
||||
ListenAddress {{ eth0_ipv6_ip }}
|
||||
{% endif %}
|
||||
|
||||
# This system is following system-wide crypto policy. The changes to
|
||||
# crypto properties (Ciphers, MACs, ...) will not have any effect in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue