A Linux server has multiple IPs.
A Linux administrator needs to verify if the HTTP server port is bound to the correct IP.
Which of the following commands would BEST accomplish this task?
Click on the arrows to vote for the correct answer
A. B. C. D. E.D.
https://www.tecmint.com/find-listening-ports-linux/The command that would best accomplish the task of verifying if the HTTP server port is bound to the correct IP on a Linux server with multiple IPs is "netstat".
Explanation: "Netstat" is a command-line utility tool that displays active network connections, routing tables, and network interface statistics on Linux systems. The command can be used to verify if a particular port is open and to which IP address it is bound to.
To verify if the HTTP server port is bound to the correct IP, the following command can be used:
perlnetstat -tlnp | grep :80
This command will display all the listening TCP connections on port 80 (-tlnp) and grep command is used to filter out only the relevant output.
In the output, the IP address to which the port is bound will be displayed under the "Local Address" column. The Linux administrator can compare this IP address with the correct IP to verify if the HTTP server port is bound to the correct IP.
Option A ("route") displays the system's routing table and is not useful in verifying the HTTP server port binding to an IP.
Option B ("host") is used to perform DNS lookups and resolve hostnames to IP addresses.
Option C ("nslookup") is used to query DNS servers for specific DNS records.
Option E ("ip") is used to display and manipulate routing, network devices, and interfaces, but does not provide information about the ports bound to a particular IP.