Score:0

Does Ubuntu server 20.x have default firewall settings?

cn flag

I am using Ubuntu server 20.04 on my server and today wanted to check what ports are open and found that neither iptables nor ufw are installed.

Is there some other firewall installed by default on Ubuntu server, or does Ubuntu just leave everything open by default?

Thanks

in flag
Modern versions of Ubuntu Server generally have `ufw` installed and enabled with some basic settings in place unless the tool was explicitly excluded during the installation process. Ubuntu Desktop does not have `ufw` enabled by default.
i9pp0 avatar
cn flag
@matigo Thanks for your reply. I have what was installed from vps and I see that ufw is not installed nor iptables. Does that mean I have zero firewall protection?
in flag
I cannot answer your question if it's with a VPS. Some VPSes, such as Amazon, block everything via their firewalls. It's not until you explicitly elect to give the server a public IP or attach it to a load balancer that traffic from outside the network can reach the instance. You will need to confirm with your provider what sort of protections they offer out of the box.
Doug Smythies avatar
gn flag
as far as I have ever known, UFW is disabled by default on Ubuntu server also, and it has no firewall by default.
i9pp0 avatar
cn flag
@Doug Smythies Thanks for you answer. Is there a way I can check? I have checked for iptables and ufw and neither are installed. Is there something else to look for?
i9pp0 avatar
cn flag
@matigo My server is running on a public ip with not further protection than what ubuntu server offers by default.
Doug Smythies avatar
gn flag
you might still have nft, I don't know. Try [here](https://unix.stackexchange.com/questions/588998/check-whether-iptables-or-nftables-are-in-use). I agree that if your server is public facing, it should have a firewall.
i9pp0 avatar
cn flag
@Doug Smythies nothing is returning for nft either. By the way, I'm using a reverse nginx proxy. Does that count as a firewall?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.