LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-14-2017, 07:16 PM   #1
trackstar2000
Member
 
Registered: Apr 2013
Posts: 82

Rep: Reputation: Disabled
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
 
Old 04-14-2017, 07:35 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
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.
 
Old 04-14-2017, 07:41 PM   #3
trackstar2000
Member
 
Registered: Apr 2013
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
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.

Last edited by trackstar2000; 04-14-2017 at 07:46 PM.
 
Old 04-14-2017, 07:44 PM   #4
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Quote:
Originally Posted by trackstar2000 View Post
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?

Last edited by Ztcoracat; 04-14-2017 at 08:23 PM.
 
Old 04-14-2017, 08:49 PM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
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.
 
Old 04-14-2017, 09:14 PM   #6
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
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.
 
Old 04-14-2017, 09:33 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,769
Blog Entries: 28

Rep: Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315Reputation: 6315
See this thread: https://www.linuxquestions.org/quest...ll-4175603347/
 
Old 04-14-2017, 11:56 PM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Is it easier to work with iptables verses firewalld?

-::-Debating on the lesser of the 2 evils to research.-::-
 
Old 04-15-2017, 12:00 AM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Quote:
Originally Posted by Doug G View Post
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.
 
Old 04-15-2017, 12:08 AM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
This might be helpful too.

https://www.digitalocean.com/communi...es-on-centos-7
 
Old 04-17-2017, 05:21 PM   #11
trackstar2000
Member
 
Registered: Apr 2013
Posts: 82

Original Poster
Rep: Reputation: Disabled
Thanks guys.
 
Old 04-17-2017, 05:23 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
Blog Entries: 15

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Quote:
Originally Posted by trackstar2000 View Post
Thanks guys.
You're Welcome.

Are things working right now?
 
Old 04-17-2017, 05:29 PM   #13
trackstar2000
Member
 
Registered: Apr 2013
Posts: 82

Original Poster
Rep: Reputation: Disabled
Haven't had a chance to work on it yet since the post. Will report back.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables and firewalld CoyoteKG Linux - Newbie 3 10-07-2016 11:03 PM
Is it Firewalld, or is it me! TheDerf Linux - Networking 8 09-03-2016 07:08 PM
iptables and firewalld on RHEL7/Centos7 sigint-ninja Linux - Newbie 5 05-26-2016 09:15 AM
firewalld sunveer Fedora 1 02-03-2013 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration