LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-06-2015, 03:24 PM   #1
acidblue
Member
 
Registered: Apr 2003
Posts: 152

Rep: Reputation: 15
Replace IPTables with Firewalld?


I have an unusual situation that I have a VPS with CentOS 7 installed, but it has
iptables instead of firewalld.
I want to repalce iptabels with firewalld, but I dont think simply removing iptabels and installing firwalld is a good solution.
I should disable iptables and then install firewalld.
but not sure how to do that, could i get some advice
 
Old 08-06-2015, 05:54 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hi:

Quote:
I dont think simply removing iptabels and installing firwalld is a good solution.
No, it's not.
I've learned at least that much from watching other threads here over the years in regard to ip tables.

-::-Yeah most likely you would disable the iptables and than install firewalld.-::-

I'm not your ip table expert but I found some documentation that could help you to understand things until a member with the experience can help you.

http://www.shellhacks.com/en/HowTo-D...in-CentOS-RHEL
http://www.certdepot.net/rhel7-disab...-use-iptables/
http://www.putorius.net/2015/01/disa...tables-on.html

Hope that helps.

Last edited by Ztcoracat; 08-06-2015 at 05:56 PM.
 
Old 08-06-2015, 06:00 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by acidblue View Post
I have an unusual situation that I have a VPS with CentOS 7 installed, but it has iptables instead of firewalld.
Congratulations, that's one of the sane changes I apply to any new RHEL / CentOS-7...


Quote:
Originally Posted by acidblue View Post
I want to repalce iptabels with firewalld
First of all please note that under the hood nothing has changed at all (yet) and any user land tool still interfaces with the in-kernel Netfilter framework. Secondly if you potentially misread this kind of deliberately crippled "information":
Quote:
With the iptables service, every single change means flushing all the old rules and reading all the new rules from /etc/sysconfig/iptables while with firewalld there is no re-creating of all the rules; only the differences are applied. Consequently, firewalld can change the settings during run time without existing connections being lost.
then you might argue "the iptables service" isn't any good. Well thats nice but its wrong as you can easily and dynamically change iptables rule sets from the command line without having to reload the complete rule set. Third: have you read any firewalld documentation or firewalld vs iptables comparisons? Are there any features you likely need on your server? Have you checked apps you regularly use (like for example fail2ban) if they already support firewalld?


Quote:
Originally Posted by acidblue View Post
could i get some advice
If your current iptables setup doesn't require any features firewalld uniquely offers then why use it?..
 
Old 08-06-2015, 06:56 PM   #4
acidblue
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: 15
Quote:
If your current iptables setup doesn't require any features firewalld uniquely offers then why use it?..

Because I hate iptables, plus all the tutorials for CentOS 7 are for firewalld.
 
Old 08-06-2015, 07:25 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
systemctl stop iptables.service
systemctl disable iptables.service
systemctl enable firewalld.service
systemctl start firewalld.service
Use firewall-cmd to configure firewalld. You should have recorded your iptables settings before switching firewalls.

Also, make sure your computer isn't exposed during the time you are firewall-less.
 
Old 08-06-2015, 07:39 PM   #6
acidblue
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Doug G View Post
Use firewall-cmd to configure firewalld. You should have recorded your iptables settings before switching firewalls.

Also, make sure your computer isn't exposed during the time you are firewall-less.
Thanks Doug,
Kinda figured thats the way it should be done, just wanted to make sure.
Better to be sure than to hose my server.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] iptables not active/firewalld is - my web server is working but I have no idea why. Skiph Linux - Newbie 6 03-25-2015 02:16 PM
LXer: How to replace Shorewall with FirewallD on ROSA Desktop Fresh R4 LXer Syndicated Linux News 0 10-14-2014 04:41 AM
LXer: How to replace Ufw with Firewalld in Linux Mint 15 LXer Syndicated Linux News 0 06-28-2013 01:50 AM
How to use the -R[replace] option of the iptables. pradiptart Linux - Networking 1 05-10-2013 09:14 AM
How to replace iptables by fwbuilder script ? marozsas Fedora 2 04-10-2006 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 11:01 PM.

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