[Centos 7] Is firewalld started/enabled as default? after started why i cant access any ports?
CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[Centos 7] Is firewalld started/enabled as default? after started why i cant access any ports?
I just installed centos 7, few days ago
my CentOS version : Linux release 7.6.1810 (Core)
this is my first time using centos 7, but i am very familiar with centos 6
Is firewalld started/enabled as default when centos rebooted?
after started using this command
service firewalld start
why i cant access any ports anymore, like 2087 (WHM), 21 (FTP) or any ports?
do i need to set them all, like below?
firewall-cmd --permanent --zone=public --add-port=2087/tcp
firewall-cmd --permanent --zone=public --add-port=21/tcp
i can access them again after run this command
service firewalld stop
Similar to CentOS 6 the default firewall is enabled and only allows ssh traffic. While service still works you should become familiar with the systemctl command.
Yes, the posted commands will open the associated ports but you should reload the firewall.
firewall-cmd --reload
Similar to CentOS 6 the default firewall is enabled and only allows ssh traffic. While service still works you should become familiar with the systemctl command.
Yes, the posted commands will open the associated ports but you should reload the firewall.
firewall-cmd --reload
whoa, so if starting/enabling firewalld i need to run all of these manually?
The --permanent option saves the new rules but does not change the run time environment. Reloading the rules is necessary to update the running firewall.
Not using the --permanent option changes run time but they are not saved.
Once the rules are saved they are automatically loaded when the firewall starts at boot time.
What ports you need to add depends on what services you run and what you want to make available to the outside world (LAN or WAN). There are many firewalld guides/tutorials.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.