LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Firewalld on Centos7 (https://www.linuxquestions.org/questions/linux-newbie-8/firewalld-on-centos7-4175603861/)

trackstar2000 04-14-2017 06:16 PM

Firewalld on Centos7
 
Is there any file that one can go in to modify it like the iptables? I just changed the ssh port with this following command below but would like to view the file.

firewall-cmd --permanent --zone=public --add-port=55


Thanks,
TT

Ztcoracat 04-14-2017 06:35 PM

You should be able to view the file in the terminal.

Use the cat cmd to look at the file.

For example if I want to view my lilo.conf file I just run this in the terminal.
Code:

cat lilo.conf
So basically just run cat <name of file>

If you have trouble finding the file just use the locate or find cmd.

cmd means command.:)

trackstar2000 04-14-2017 06:41 PM

Quote:

Originally Posted by Ztcoracat (Post 5697081)
You should be able to view the file in the terminal.

Use the cat cmd to look at the file.

For example if I want to view my lilo.conf file I just run this in the terminal.
Code:

cat lilo.conf
So basically just run cat <name of file>

If you have trouble finding the file just use the locate or find cmd.

cmd means command.:)


I am asking for the location of the file. firewalld.conf doesn't seem to have that configuration change. In the old days, iptables was the file. It is supposed to be in /etc/firewalld/firewalld.conf but I don't see anything reflecting the new port change.

Ztcoracat 04-14-2017 06:44 PM

Quote:

Originally Posted by trackstar2000 (Post 5697084)
I am asking for the location of the file. firewalld doesn't seem to have that configuration change. In the old days, iptables was the file.

Dang:-

Does Firewalld have configuration files or port files that you could go through to find what you want?

r3sistance 04-14-2017 07:49 PM

I personally just uninstall firewalld and re-install iptables, unfortunately ipsets implementation in CentOS 7 is a bit buggy due to lacking properly systemd script.

Code:

systemctl stop firewalld
systemctl disable firewalld
yum remove firewalld
yum install iptables-services iptables
systemctl enable iptables
systemctl start iptables

Oddly, you still need to use "service iptables save" to save the config, or directly edit /etc/sysconfig/iptables I believe.

Doug G 04-14-2017 08:14 PM

On fedora anyway, the firewalld files are in /etc/firewalld

But I don't think it's a good idea to edit files directly, you can do what you need with the firewallcmd admin program.

frankbell 04-14-2017 08:33 PM

See this thread: https://www.linuxquestions.org/quest...ll-4175603347/

Ztcoracat 04-14-2017 10:56 PM

Is it easier to work with iptables verses firewalld?

-::-Debating on the lesser of the 2 evils to research.-::-

Ztcoracat 04-14-2017 11:00 PM

Quote:

Originally Posted by Doug G (Post 5697114)
On fedora anyway, the firewalld files are in /etc/firewalld

But I don't think it's a good idea to edit files directly, you can do what you need with the firewallcmd admin program.

Agreed. Some configuration files should not be edited unless one really knows what he or she is doing.

Ztcoracat 04-14-2017 11:08 PM

This might be helpful too.

https://www.digitalocean.com/communi...es-on-centos-7

trackstar2000 04-17-2017 04:21 PM

Thanks guys.

Ztcoracat 04-17-2017 04:23 PM

Quote:

Originally Posted by trackstar2000 (Post 5698261)
Thanks guys.

You're Welcome.

Are things working right now?

trackstar2000 04-17-2017 04:29 PM

Haven't had a chance to work on it yet since the post. Will report back.


All times are GMT -5. The time now is 11:30 AM.