LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2019, 05:06 AM   #1
marius09
Member
 
Registered: Mar 2019
Posts: 37

Rep: Reputation: Disabled
rules


hi,
just to clarify.
I have a server with 2 NICs.
The I/O network traffic that come and exit using the 2 NICs will use firewalld process in centos 7.right?
Firewalld looks in firewall table for every packet that come using evey NIC.right?

firewall-cmd --zone=public --add-port=161/udp --permanent -means that the traffic on port 161 is allowed?
tnx
 
Old 04-22-2019, 08:15 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by marius09 View Post
hi,
just to clarify.
I have a server with 2 NICs.
The I/O network traffic that come and exit using the 2 NICs will use firewalld process in centos 7.right?
Firewalld looks in firewall table for every packet that come using evey NIC.right?

firewall-cmd --zone=public --add-port=161/udp --permanent -means that the traffic on port 161 is allowed?
tnx
Perhaps a better name for your thread might have been, "Advice with configuring firewalld"

Please see the Firewalld Documentation and specifically the manual page for firewall-cmd.

Take note of what the --permanent option will and will not do for you. I.e. you need to either reload, or issue the same command without the --permanent qualifier to have it effective at runtime.

This command will allow UDP traffic on port 161.
 
Old 04-24-2019, 01:38 AM   #3
marius09
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
the link does not respond to my question.
 
Old 04-24-2019, 03:20 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
As far as I know, it’s the netfilter kernel module that processes network traffic, and firewalld is a front-end to netfilter. You don’t need firewalld and the firewall-cmd to implement a firewall.

Packets that enter and leave through any NIC are processed according to netfilter rules.

The firewall-cmd command in the question allows traffic to port 161 that comes from interfaces in the public zone, but as rmistler says, you need to reload (or reboot), or issue the same command without the permanent option.

Last edited by berndbausch; 04-24-2019 at 03:22 AM.
 
Old 04-24-2019, 03:28 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
"we could add this to the "public" zone for this session using the --add-port= parameter. Protocols can be either tcp or udp"

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

However on that link, notice the disclaimer about version and other reasons this could fail or not work as expected.
 
  


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
auditctl -l not showing any rules even though i have rules written in audit.rules alphaguy Linux - Security 1 02-07-2014 05:28 PM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
How to write two snort detection rules to alert on packets to those rules romafiel *BSD 0 06-08-2007 07:00 PM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM
Viruses, ipchains, dynamic rules, rules with regular expressions marktaff Linux - Security 2 09-25-2001 04:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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