6

I often read an article which enables a firewall to secure public Wi-fi.

But I think a firewall may not be needed when (like nmap said) all ports are closed.

If all ports are closed, all packets which are received by attackers are dropped because there are no services attached to the port.

Does my thinking seem correct?

  • Are you talking about your pc or an enterprise computer or what? if its your pc and you're not publishing any services and no ports are open then you're ok...that's what a firewall would do for you in this case. – Silverfox Feb 9 '16 at 9:24
  • Depends if it blocks outgoing connections too - some firewalls allow you to block unknown outgoing connections, such as might be made by malware. If not, there could potentially be outgoing connections which result in problems, if at any previous point your computer has picked up any issues. – Matthew Feb 9 '16 at 9:28
5

Connection requests to unbound TCP ports will not be DROPped, they will be REJECTed. (And although this requires a little more effort on your PC's behalf, this is also what most firewall configurations do, so it doesn't really matter.) Otherwise, your assumption is good - if no services are listening on any of your incoming ports, you don't need a firewall.

But how do you make sure this is the case?

Do you know of each and every program on your machine that is able to listen on a port? Maybe you have a program that happens to listen on a port for some useful function but it's buggy and it can be exploited. Maybe you have a virus that listens on a port to receive commands. Maybe you forgot to turn off file sharing and all of your family pictures are now on the laptop of the man across you at McDonald's, or worse, deleted.

Firewalls are much more convenient and secure. On a modern operating system, you can't make sure you know each and every process that may put your machine or your data at risk if you allow them on the net. You can easily block these using a firewall. If you configure your firewall well, you can make sure that only the processes you want are allowed to listen, because you need to give permission manually to every one of them.

  • 2
    You are only looking at the incoming side - a good firewall also secures outbound traffic only from those ports/applications allowed. – rbialon Feb 9 '16 at 12:42

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.