LAB 33 ‐ Port reachability within subnet(telnet) - DevWithNehaCloud/Oracle-Cloud-Infrastructure-wiki GitHub Wiki
Port Reachability Within Subnet (Telnet)
The URL uses the HTTPS protocol, which runs on the default port 443.
- Let's try to perform a telnet test on IP address 142.251.128.238 to check port connectivity on port 443.
- As we can see, the command does not work because the Telnet software/client is not installed on the system.
Now first switch to root then install telnet
sudo su - root
yum install telnet
- As we can see, we're unable to download the package because the TCP protocol is not allowed in the egress security rule. So, let's add a TCP egress rule to allow the traffic.(to download packets we need TCP protocol)
- Click on Add Egress Rule, then set the destination CIDR to 0.0.0.0/0 and select the protocol as TCP to allow outbound traffic on TCP ports.
- Now we can see that the software is downloading successfully.
- Now let's run the Telnet command again to check port connectivity after exit from the root, and this time it works successfully.
- Let's make the rule more restrictive by adding an egress rule with the CIDR 0.0.0.0/0 and allowing only port 443 instead of allowing all ports.
its connected.
Now we will connect two instances(bastion-server to bastion-test-server) over a private network.
Let's create another temporary test instance.
- Run the ping command using the private IP address of the new instance.
- Since the ping command is not getting any response, it means the network traffic is being blocked by the security rules. To allow ICMP traffic between the instances, we first need to add an ingress rule.
- The ping command still will not work because we also need an egress rule. Outbound traffic must be allowed so that the instance can send ICMP request packets to the destination instance.
adding egress rule now
Now the ping command is working successfully, which means the instances can communicate with each other over the private network.
Now that the ping test is working and basic network connectivity between the instances has been verified, let's check application-level connectivity using Telnet.
Now We will perform a Telnet test from bastion-server to bastion-test-server to verify private connectivity and confirm that the required application port is reachable.
- Let's try to perform a Telnet test on {target_server_ip} to check port connectivity. As we can see, the connection fails because the required ingress rule has not been added yet to allow inbound traffic on that port.
- Let's add an ingress rule by specifying the source CIDR as the source server IP and allowing the TCP protocol on destination port 22 to permit SSH connectivity.
- We can see the connection still does not work because the target IP has not been allowed in the egress rule. Outbound traffic from the source instance must also be permitted,
so let's add the target IP to the egress rule.
- Now we can see that the Telnet command works successfully using the target IP, which validates both the IP reachability and port connectivity.