LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-20-2017, 01:57 PM   #1
Reksio
Member
 
Registered: Mar 2016
Location: 127.0.0.1
Distribution: Fedora, CentOS, RHEL
Posts: 34

Rep: Reputation: Disabled
Firewalld command line doesn't list the correct active zone


Hi,

From what I understand to change the active zone in Firewalld through firewall-cmd you have to issue a command

Code:
firewall-cmd --zone=external --add-interface=wlp2s0
And after I click enter and run the command I see this, confirming that the zone has been changed:

Code:
The interface is under control of NetworkManager, setting zone to 'external'.
success
The problem is, when I list the active zone it is still "drop" (my current default zone) and when I "list all" I see that:
Code:
drop (active)
  target: DROP
  icmp-block-inversion: no
  interfaces: wlp2s0
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:
This naturally leads me to believe that the zone was not in fact changed to external and is still drop, meaning that the command didn't work properly... However, when I open the Firewalld applet, the current zone is actually "external" now, so I guess that the command line doesn't list the right active zone for some reason.

Someone told me that before doing the "--add-interface" I need to first drop the interface from the default zone, but that doesn't actually change anything.

Any help is appreciated!
 
Old 08-20-2017, 04:16 PM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Use this
Code:
firewall-cmd --set-default-zone=external
 
Old 08-20-2017, 04:19 PM   #3
Reksio
Member
 
Registered: Mar 2016
Location: 127.0.0.1
Distribution: Fedora, CentOS, RHEL
Posts: 34

Original Poster
Rep: Reputation: Disabled
That will change the default zone, meaning that if I have more interfaces they will all be placed in that zone. I want just one interface to change zones.


Unless I'm mistaken...?
 
Old 08-21-2017, 03:48 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Basically, yes. New interfaces will be placed in that zone.
You better search for good tutorial on NetworkManager and firewalld, to get you informed.
 
  


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
[SOLVED] Command to convert a sentenced list into a line list separated by an or symbol? linustalman Linux - General 10 03-28-2017 08:43 AM
LXer: Understanding Firewalld in Multi-Zone Configurations LXer Syndicated Linux News 0 02-02-2017 08:40 AM
[SOLVED] Firewalld zone allows source address access. gctaylor1 Red Hat 2 04-13-2016 09:44 AM
[SOLVED] Selecting the correct firewalld zone borgy95 Linux - Networking 1 06-25-2015 05:03 AM
Changing the Time Zone from the Command Line unclebyron Linux - Newbie 1 02-06-2004 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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