Questions tagged [firewalld]

Questions regarding firewalld a firewall service daemon

Firewalld is a service daemon with D-Bus interface

Firewalld provides a dynamically managed firewall with support for network/firewall zones that define the trust level of network connections or interfaces.

Site: http://www.firewalld.org/

140 questions
0
votes
1 answer

Variable in firewall-cmd command

I'm trying to do a script in Bash to add some firewall rules. The variable I'm passing isn't working, I guess I'm doing the substitution wrong. firewall-cmd --add-rich-rule='rule family="ipv4" source address="$IP/32" port port=10000 protocol=tcp…
Dominique
  • 33
  • 3
0
votes
1 answer

FirewallD Order of Zone Evaluation

I spent a couple hours today attempting to setup a firewall rule for SSH access. I have multiple custom zones as shown below. I've changed most of the IP addresses for security reasons. firewall-cmd --get-active-zones web-zone interfaces: eth0 …
Bob Dill
  • 39
  • 4
0
votes
1 answer

firewall-cmd tcp ssh REJECT rule not working

Below xml content shows firewalld rules I created. There are two rules with status "REJECT" are means to avoid the ssh connection to the server. But it is not working. It is allowing the connection. I did firewall-cmd reload. The other icmp rule…
user4981459
0
votes
1 answer

Firewalld - forwarding traffic received on eth1:0 to different IP than eth1

I have the following two zones in firewalld: zone1 (active) target: default icmp-block-inversion: no interfaces: eth1 sources: services: ports: 80/tcp 443/tcp protocols: masquerade: yes forward-ports:…
Stefan
  • 316
  • 2
  • 16
0
votes
1 answer

How come Docker Host & check_mk agent fail to addrress port 6556?

I have Ubuntu 16.04 host and installed check_mk agent on it & all was ok. Then I installed docker on it and now I can not hit port 6556 and check_mk checks are failing too. I tried per docker KB but no luck - Add iptables policies before Docker’s…
0
votes
2 answers

Get 'state' from dbus using python

I want to do a very simple thing in python - read the state from firewalld over dbus - "org.freedesktop.DBus.Properties" . According to https://firewalld.org/documentation/man-pages/firewalld.dbus.html state - s - (ro) firewalld state. This can be…
Kenneth A
  • 13
  • 6
0
votes
1 answer

Deploying and Securing Docker Containers and Server OS

I am running a CENTOS Server and will be installing the Docker Engine on top of that where needless to say, I will be setting up my containers. I'll initially be setting up two containers: (1) serve my web pages (2) run my database. My thought…
user2613126
  • 55
  • 1
  • 1
  • 5
0
votes
0 answers

firewalld-cmd remove-rule command in shell script throws error

IFS=$'\n'; for i in `firewall-cmd --direct --get-all-rules`; do firewall-cmd --permanent --direct --remove-rule $i && firewall-cmd --reload; done The above command throws error as usage: --permanent --direct --remove-rule { ipv4 | ipv6 | eb } …
Ibrahim Quraish
  • 3,889
  • 2
  • 31
  • 39
0
votes
3 answers

Docker Intercontainer communication on CentOS 7

I am setting up a microservices architecture using docker for each service. I am also using kong API gateway running in its own docker container. The docker host is Centos 7 running in a VM with an IP 192.168.222.76. On the host command line, I can…
Rich Schramm
  • 141
  • 1
  • 8
0
votes
1 answer

CentOS - No route to host when trying git clone

I'm trying to clone a repo from github by using the command: git clone https://github.com/ However, I'm getting the below error: fatal: unable to access "https://github.com/...." : Failed connect to ip addr : port; No route to host I have tried…
pree
  • 2,297
  • 6
  • 37
  • 55
0
votes
2 answers

Ansible fatal error while trying to print the state of firewalld

Here, i am trying to print the status of the firewall-cmd --state command , but a fatal error is being thrown. name: Check firewall status hosts: st tasks: - name: Check status of firewall command: firewall-cmd…
SaAk
  • 75
  • 2
  • 13
0
votes
1 answer

D-Bus API or C library to control firewalld

I'm working on a project, implementing everything in C language. As a part of the project, we need to be able to control and configure firewalld, firewall of the current system. firewalld is implemented in Python and an interface is available.…
Motun
  • 2,149
  • 3
  • 16
  • 23
0
votes
2 answers

configuring firewalld using ansible with system facts

I have the following play: - command: "hostname -I" register: IP_ADRESSS changed_when: False - firewalld: interface: eth0 state: enabled permanent: yes zone: public source: {{ IP_ADDRESS.stdout }} notify: "RESTART…
NOOBIE
  • 43
  • 3
0
votes
0 answers

firewalld entries to allow local LAN access to httpd server on QEMU Linux guest on Fedora 25 host

I've got a Fedora 26 QEMU guest VM with a LAMP application running on a Fedora 25 host. I can access the guest web server from both the guest and the host, but I can't access it from the other systems on my local LAN - and I'd like to be able to do…
jimstaffer
  • 23
  • 6
0
votes
0 answers

call bash function as commandline argument

Hope you can help... I have a script that will be used to create firewalld rules depending on the chosen function. What I would like to know is it it possible to call a function from the commandline E.G ./script.sh web #!/usr/bin/env bash set…
CJW101
  • 1
  • 2