LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-31-2015, 03:01 PM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
How to quickly test / assess and set up firewalld?


I have the latest release of CentOS7, and I did yum install firewalld earlier today. I've been entering some commands, but nothing advanced, and I would say that like 90-100 of it should be good.

I had some issues with sftp connection, but it was not related to firewalld. At this point it looks like firewalld is blocking httpd, as when it is turn on websites dont show, and when I turn it off they load almost right away.

I want to use this Linux installation for Apache web server, sftp connection (vsftpd), email (probably, I have not installed it yet, so this does not even count), and nothing else.

How would I make sure that firewalld settings are correct for this (unchanged, possibly only in the minimal way), and that everything works as it should, especially the httpd...

This is probably like two or three commands, and it is done. I just dont have that general understanding and perspective of how this works. I read quite a lot about it, but still I am not sure if I have it where it needs to be, settings-wise, at this point.

I mean, default zone - public, ssh enabled to there, in order for httpd to work - do this. What else would be good to do or check here?

Last edited by AdultFoundry; 10-31-2015 at 03:02 PM.
 
Old 11-01-2015, 02:53 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Try firewall-cmd. To see what ports are open, use firewall-cmd --list-ports. To open port 80, firewall-cmd --add-port 80/tcp.
 
Old 11-01-2015, 03:22 AM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Try firewall-cmd. To see what ports are open, use firewall-cmd --list-ports. To open port 80, firewall-cmd --add-port 80/tcp.
This is to the point, and it makes sense. I added the 80 and the websites work. I will make it --permanent, and so on, I read about that... I use sftp, ssh, and Apache web server, so I guess I need these two ports open, and nothing else.

Would I just leave it as is, and move on, or would there be any other settings / configurations that I could check... Like I said, I am particular about these things, as I want to figure out the best way to go with all the aspects of configuring these things, make notes, and based the further work on this. I want it to be 100% good / correct, so to speak, understand as much as I need to, before moving on to the next step.
 
Old 11-01-2015, 04:35 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by AdultFoundry View Post
This is to the point, and it makes sense. I added the 80 and the websites work. I will make it --permanent, and so on, I read about that... I use sftp, ssh, and Apache web server, so I guess I need these two ports open, and nothing else.
Yes, I forgot about the --permanent option. Great that you found it.

Quote:
Would I just leave it as is, and move on, or would there be any other settings / configurations that I could check... Like I said, I am particular about these things, as I want to figure out the best way to go with all the aspects of configuring these things, make notes, and based the further work on this. I want it to be 100% good / correct, so to speak, understand as much as I need to, before moving on to the next step.
Centos has a very tight firewall; by default, it only opens the ssh port and allows ICMP packets (i.e., ping). This is for a good reason, as you can imagine.

Only open the ports you must. If you run a web server, open the http and (if your web server also features secure http) https ports. If you run a mail server, the SMTP port. Set up your firewall for ftp if you have an ftp server. And so on. Don't open ports because you think you might need them some time; as you could see, it's almost trivial to open them at the moment you need them. Keep your system as locked up as possible.
 
  


Reply



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
How to set test IP's and test files? SimpleTricks Linux - Server 1 08-09-2013 07:06 AM
Internet Assess through MS server as a Linux client. baig Linux - Newbie 8 11-23-2008 12:29 PM
LXer: How to...assess open source storage software LXer Syndicated Linux News 0 08-02-2006 03:33 PM
LXer: Startup Helps Assess Open-Source Projects LXer Syndicated Linux News 0 07-13-2006 06:03 PM
Brute-force attack - How can I assess the damage? thew00t Linux - Security 4 09-27-2005 06:08 PM

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

All times are GMT -5. The time now is 01:44 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