I was studying about how port numbers work and got few questions as follows(sorry but I'm a noob and new to networking stuff but quite interested to learn all this :D )-

1. Where all does firewall exist- Server, client or intermediate routers and bridges.

2.What does it mean to add an exception to a firewall.

3.Opening a port means running a service that we want to be accessible to others. For others to use my running service I need to provide them my port number so that they can connect to it. If I am thinking this right way then, where does firewall come into the picture.

4. When I run a netstat command on my windows machine then, I see lots services listening on a specific port. I'm not hosting any website so why do I need a service that listens(my pc basically acting as a server). Output looks like this.

Proto  Local Address          Foreign Address        State
 TCP             SHIVAM-PC:0            LISTENING
 TCP            SHIVAM-PC:0            LISTENING
 TCP            SHIVAM-PC:0            LISTENING

What does listening port 80 mean specifically. I'm not hosting any website for http connections.Why is a service running to that listens on port 80.
Kindly help.

  • Sorry, but this question seems to be off-topic here and might be better asked at serverfault.
    – Sebastian
    Jan 8 '16 at 16:16
  • But here are some words you might want to use as a base for advanced googling and short answers: 1:) All three, and additional as standalone devices 2:) Allow a specific address to access a port which is generally blocked (or vice versa, depending on firewall design) 3:) I don't understand the question. Firewalls limit access to ports for specific known or unknown clients 4:) If there is a port 80 open on your machine, there is also a service listening to it. 80 is sometimes used for something different than http
    – Sebastian
    Jan 8 '16 at 16:22
  • @Sebastian very useful. Thanks alot. Just one thing with which I'm little bit still confused is, when adding a exception to a firewall then we do so at the server side or the client side ? Jan 8 '16 at 16:28
  • That depends on the general design. If it is a local firewall on a server/client, then you'd do it there. If it is a extra firewall for a network, then there. In general, you change the ruleset of a Firewall where you want the traffic to terminate. So, to allow a host to ping outside where a local firewall denies that, you'd have to make an exception on that host.
    – Sebastian
    Jan 11 '16 at 9:50
  1. A firewall can exist in any or all which you have listed, or it can be a stand-alone device.
  2. By default, a firewall will block all incoming traffic. Adding an exception means that you are overriding that behavior for some traffic.
  3. The meaning of opening a port depends on the context. In the context of a firewall, it means creating an exception for traffic destined for that port. In the context of an end-device, it means that an application has requested that port from the transport-layer protocol.
  4. As far as the specifics of your OS listening to ports, you will need to ask that question somewhere else, such as Super User since it is off topic here because it involves applications/application-layer protocols, and different OSes may have different needs for listening on ports.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.