Allow SSH Port to Specific IP Address

Allow SSH Port to specific IP addresses

Navigate to the dashboard, click on the server, and open your instance.

Create security group

Click on the security group

Check the rules

Click on the view and open the Add Rule section

Delete the default rules

Here we can see all ports and protocols allowed to all IPs (CIDR: 0.0.0.0/0).

But we want to allow the port to a specific IP so delete all the ingress and egress Click on the add rule

To add custom rules for SSH

Get your public IP

To add the rule, first search for your public IP on Google by clicking on this Link.

Copy your public IP and the following IPs to add to the CIDR section of the rule.

Allow the SSH port to follow these steps

Rule :- custom protocol

Description:- ssh_port_allow

Direction: Allow ingress and egress to one by one

Open Port:- Port

Port Number:- 22

Protocol: TCP

Remote: select CIDR

CIDR:- your internet public IP

Ether type:- IPv4

Now click on the add rule

Same as the egress rule.

After adding the ingress and egress rule to check security group rules

SSH Specific IP

Now access the instance

Last updated