Skip to content

Should ssh_port = 22 always be provisioned and exposed? #636

Answered by mysticaltech
Mess0 asked this question in Q&A
Discussion options

You must be logged in to vote

I understood why it's there, it's because of the rescue image which forces us to use port 22. However, you can close this port afterward, after the cluster is deployed, by applying this rule via extra_firewall_rules, it will replace it.

  extra_firewall_rules = [
    # Close the SSH port 22
    {
      direction       = "in"
      protocol        = "tcp"
      port            = "22"
      source_ips      = ["255.255.255.254/32"] # no source IPs allowed
      destination_ips = []                     # Won't be used for this rule
    }
  ]

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mess0
Comment options

@Mess0
Comment options

@mysticaltech
Comment options

Answer selected by mysticaltech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants