I have seen that utilisation of a firewall when using a public network is recommended. So I install ufw and gufw and deny incoming connection and allow outcoming connection on all profiles.

Is that adequate or I need to add some rules ?

There is no server on my laptop. The public network is a university wifi network and my utilisation on this will be basic (but with maybe some connection on differents accounts).


  • Welcome to Ask Ubuntu. Whether it is adequate or not, depends on what you do on the public network. Particularly, if any servers are running on your laptop, and if so, which ones? Please edit your question and add more information. – user68186 Sep 4 '19 at 16:43
  • Would probably use a VPN or at least encrypt everything incoming and outgoing on public network if you don't want everybody reading your passwords and banking info. If just watching cat videos your firewall is good enough. – crip659 Sep 4 '19 at 17:16
  • Thanks I editing the question and add more precision. – nicsense Sep 4 '19 at 17:31

Without knowing more about your security needs on this system in question, the 'default' ruleset of "Deny incoming connections from Outside" and "Allow Outgoing Connections" from the firewall's perspective is usually a 'safe' practice.

You should be 'good to go' from most threats and risks, the only concern is if you also want to filter outbound traffic, but that would be better handled by some other type of application than just your firewall directly. Short story, though, the defaults should be good for the basic needs case.

However, if you have any servers on your system that need to be web facing you'll need to add rules. The tricky part is that as you don't define your restrictions, it's impossible to really provide a 'good' answer or not about whether or not the defaults are sufficient.

| improve this answer | |
  • Thanks. I edited question and add more precision. – nicsense Sep 4 '19 at 17:32
  • @nicsense then the rest of this answer is valid - the default 'deny incoming, allow outgoing' firewall should be sufficient for general network defense. – Thomas Ward Sep 4 '19 at 17:49
  • Ok, Thanks but I saw in documentation that "public profile" in ufw is configured with "reject incoming", not "deny incoming". Is it important for security ? – nicsense Sep 6 '19 at 8:14
  • @nicsense reject/deny are synonyms for the same behavior. – Thomas Ward Sep 6 '19 at 10:45

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.