0

I have a connection to another machine and was looking at which ports are open internally and which ports are open on all interfaces, I ran the following netstat command to achieve this

netstat -ano

enter image description here

From what I know, ports associated with the IP 0.0.0.0 and [ :: ] being the IPv6 version of it, are open on all interfaces and can be accessed from the internet. Ports associated with 10.10.10.74 are internally open and can only be accessed from the Local network.

However, reading some of the official writeup, it is said that the port 445 is the internal port which seems to be contradicting this output then.

Is my understanding of this output wrong? PS: This is a hackthebox machine hence there are writeups by other individuals and I'm referencing them.

2
  • 1
    "... reading some of the official writeup, it is said ...." - it would be helpful if you would cite/reference the original instead of providing your own wording which only reflects your understanding and might actually be wrong. Aug 10 at 18:09
  • This is not a security question. This is a netstat output interpretation and Linux internals question. google.com/search?q=netstat+0.0.0.0 top hit: serverfault.com/questions/78048/…
    – schroeder
    Aug 10 at 20:02

1 Answer 1

2

... are open on all interfaces and can be accessed from the internet.

This information alone does not say anything if a port is actually reachable from the internet.

Even when listening on any (0.0.0.0 for IPv4 or [::] for IPv6) there might still be local firewall rules which block access. Or there might be a firewall on the network which blocks access from the internet. Or the internal network might use only private IP addresses not routable on the internet, so that there need to be NAT done for accessing the internet - which implicitly restricts incoming traffic.

Ports associated with 10.10.10.74 are internally open and can only be accessed from the Local network.

Similar, just because there is a fixed IP address does not mean it is not reachable from the internet.

The system might have a publicly routable IP address here - in which case it might be directly accessible from the internet (unless firewalls block it). In this specific case of 10.10.10.74 the IP is from the private IP range and thus not routable on the internet. But there might still be some port forwarding setup on the internet-facing router which forwards access from the internet to this listener.

Not the answer you're looking for? Browse other questions tagged .