Common Network Ports - CompTIA A+ 220-1001 Prof Messer





  • I'm kind of confused on how ports work. So multiple things can use the same port number because they have different IP addresses?



  • @connorsoliver said in Common Network Ports - CompTIA A+ 220-1001 Prof Messer:

    I'm kind of confused on how ports work. So multiple things can use the same port number because they have different IP addresses?

    Yes. So think of it like this...

    IP Address is like your street address "123 Friendly Lane, Joplin, Missouri"

    Your port is your suite number "Suite 300" or your room number in a hotel "Room 653"

    When you are delivering a pizza, you can deliver to "Room 300" at every hotel in town. That one hotel has a room 300 doesn't mean that another hotel can't have a room 300, too. But each hotel's address has to be unique or the pizza guy can't find the building.

    So every IP address gets ~64,000 TCP ports to use that it owns. A "service" needs an IP + Port combination to have somewhere to send the information.



  • Hiw would a client prevent someone from accessing a remote desktop connection? It is a bit confusing.



  • @mary said in Common Network Ports - CompTIA A+ 220-1001 Prof Messer:

    How would a client prevent someone from accessing a remote desktop connection? It is a bit confusing.

    on a port level, Block or shutting off that specific port for the RDP they are using/trying to use would prevent that.

    On an OS level - At least for windows Shutting off access to RDP will do the trick - It can be enabled or disabled (from my understanding. I've seen it a few times.)



  • @mary said in Common Network Ports - CompTIA A+ 220-1001 Prof Messer:

    Hiw would a client prevent someone from accessing a remote desktop connection? It is a bit confusing.

    You prevent access by either disabling the service that's using the port, then nothing will be there to accept the request when it comes in, OR you use a firewall to setup rules for that port. example, allow IP A to access the port, but nothing else, etc.



  • @mary said in Common Network Ports - CompTIA A+ 220-1001 Prof Messer:

    Hiw would a client prevent someone from accessing a remote desktop connection? It is a bit confusing.

    Well, a few ways...

    Assuming we are talking about network ports as the context, all we need to do is stop communications going to that address or port.

    So your Windows firewall on the device itself, on your desktop or server, will block RDP port (3389) by default. You need to open that port in order for anything to access it anyway. Which you can do by opening that specific port and/or by turning off the firewall completely (no competent IT person does that, but loads and loads of people do it anyway.)

    If you have a separate firewall out in front of your device (and you basically always should as well) then it will block all traffic by default for two reasons - first that is just the standard and second, because "all" networks are NATed, that alone blocks everything by default because there needs to be a manual mapping between outside ports and inside services.

    So not only must you manually "allow" any RDP connection through your main firewall, but you must also map the external IP and port that you want to the internal IP and port for it to work.



  • @scottalanmiller said in Common Network Ports - CompTIA A+ 220-1001 Prof Messer:

    y default for two reasons - first that is just the standard and second, because "all" networks are NATed, that alone blocks

    caveats to be aware of: many home routers have uPNP enabled. So it's possible that your machine could/will configure your router and open/forward these ports to itself as needed.

    This is specifically something the xbox does.

    This is why most firewall admins disable uPNP, or decent or better firewalls have uPNP disabled by default.