Ask Your Question

Why are so many ports defined in firewall, are they all open?

asked 2015-03-03 12:32:29 -0500

I've been looking in Firewall on Fedora 21, and in the services tab, there are a lot of services that are defined, I noticed to open a port, for a service I define it there. Are all those ports that are defined in the services open?

Wouldn't it be good practice to delete the values/ports from all the services I don't use?

On my Debian systems it's much easier, there I define iptables by hand, and only allow ports that I use.

Some info greatly appreciated.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-03 13:26:29 -0500

aeperezt gravatar image

Port define on those services are not open the only ports that are open are the ones that are selected, you can verify this on your terminal with this instruction:

sudo firewall-cmd --zone=FedoraWorkstation --list-services

in my case it return

dhcpv6-client samba-client ssh

which are the services and ports I allow on my machine.

I do miss a bit iptables but found a nice and easy to use firewalld with firewall-cmd which allow me to open a temporary port for a test and no worried about leaving it open as firewall will restore to the regular configuration unless I add --permanent on the command.

to open a port can be as simple as:

sudo firewall-cmd --add-port=200/tcp

For a newbie that do not want to learn all the iptables rules can be as simple as that.

Hope it helps

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-03-03 12:32:29 -0500

Seen: 480 times

Last updated: Mar 03 '15