Giter Site home page Giter Site logo

doytsujin / firewalld Goto Github PK

View Code? Open in Web Editor NEW

This project forked from firewalld/firewalld

0.0 1.0 0.0 19.07 MB

Firewall daemon with D-Bus interface

License: GNU General Public License v2.0

Shell 0.97% Python 96.24% Makefile 2.10% M4 0.61% Dockerfile 0.07%

firewalld's Introduction

README for firewalld
====================

firewalld provides a dynamically managed firewall with support for network or 
firewall zones to define the trust level of network connections or interfaces. 
It has support for IPv4, IPv6 firewall settings and for ethernet bridges and a 
separation of runtime and permanent configuration options. It also provides an 
interface for services or applications to add ip*tables and ebtables rules 
directly. 


Development
-----------
To check out the source repository, you can use:

  git clone https://github.com/firewalld/firewalld.git

This will create a local copy of the repository.

Language Translations
---------------------
Firewalld uses GNU gettext for localization support. Translations can be done
using Fedora's Weblate instance [1]. Translations are periodically merged into
the main firewalld repository.

[1] https://translate.stg.fedoraproject.org/projects/firewalld/

Dependencies
------------
These are the runtime dependencies:

  linux >= 5.3
  python3-dbus
  python3-gobject
  python3-nftables >= 0.9.4

Note: python2 is _not_ supported.

Optional Dependencies
---------------------
These dependencies may enhance firewalld's functionality, but they are not
required.

  ebtables
  ipset
  iptables
  polkit
  python3-capng (libcap-ng-python3)

Working With The Source Repository
----------------------------------
In addition to the runtime dependencies some others are needed to build from
source:

  desktop-file-utils: /usr/bin/desktop-file-install
  gettext
  intltool
  glib2: /usr/bin/glib-compile-schemas
  glib2-devel: /usr/share/aclocal/gsettings.m4
  systemd-units

To be able to create man pages and documentation from docbook files:

  docbook-style-xsl
  libxslt

Use the usual autoconf/automake incantation to generate makefiles

  ./autogen.sh
  ./configure

You can use a specific python interpreter by passing the PYTHON variable. This
is also used by the testsuite.

  ./configure PYTHON=/path/to/python3

Use

  make

to create the documentation and to update the po files.

Use

  make check

to run the testsuite. Tests are run inside network namespaces and do not
interfere with the host's running firewalld. They can also be run in parallel
by passing flags to autotest.

  make check TESTSUITEFLAGS="-j4"

The testsuite also uses keywords to allow running a subset of tests that
exercise a specific area.
For example:

  make check TESTSUITEFLAGS="-k rich -j4"
   24: rich rules audit                                ok
   25: rich rules priority                             ok
   26: rich rules bad                                  ok
   53: rich rules audit                                ok
   23: rich rules good                                 ok
   55: rich rules bad                                  ok
   74: remove forward-port after reload                ok

You can get a list of tests and keywords

  make -C src/tests check TESTSUITEFLAGS="-l"

Or just the keywords

  make -C src/tests check TESTSUITEFLAGS="-l" \
    |awk '/^[[:space:]]*[[:digit:]]+/{getline; print $0}' \
    |tr ' ' '\n' |sort |uniq

There are integration tests. Currently this includes NetworkManager. These may
be _destructive_ to the host. Run them in a disposable VM or container.

    make check-integration

There is also a check-container target that will run the testsuite inside
various podman/docker containers. This is useful for coverage of multiple
distributions. It also runs tests that may be destructive to the host such as
integration tests.

  make check-container TESTSUITEFLAGS="-j4"

OCI Container Image
-------------------
As part of the `dist` build target an OCI container image is generated. This is
distributed alongside the normal release tarball. It can be used to run
firewalld from a container.

To manually load the container image into your environment:
        
  # podman load -i .../path/to/firewalld-oci-<ver>.tar

To fetch the image from quay.io:

  # podman pull quay.io/firewalld/firewalld:<ver>

where <ver> is optional. latest will be used if omitted.
                  
To start the daemon/container:
                          
  # podman run -d -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket \
               --network host --privileged \
               --name my-firewalld firewalld

The volume mount is needed to access the host's running system dbus.
The source path of the socket may vary depending on distribution.

Firewalld's configuration will live inside the container. Therefore
users may want to occasionally `podman commit` the image.

Using firewalld's CLI should be done via podman exec after the
daemon/container has been started:

  # podman exec my-firewalld firewall-cmd ...

RPM package
-----------

For Fedora and RHEL based distributions, there is a spec file in the source
repo named firewalld.spec. This should be usable for Fedora versions >= 16 and
RHEL >= 7.


Links
-----
Homepage:          http://firewalld.org
Report a bug:      https://github.com/firewalld/firewalld/issues
Git repo browser:  https://github.com/firewalld/firewalld
Git repo:          https://github.com/firewalld/firewalld.git
Documentation:     http://firewalld.org/documentation/


Mailing lists
-------------
For usage:         https://lists.fedorahosted.org/archives/list/[email protected]/
For development:   https://lists.fedorahosted.org/archives/list/[email protected]/


Directory Structure
-------------------
config/                 Configuration files
config/icmptypes/       Predefined ICMP types
config/services/        Predefined services
config/zones/           Predefined zones
config/ipsets/          Predefined ipsets
doc/                    Documentation
doc/man/                Base directory for man pages
doc/man/man1/           Man(1) pages
doc/man/man5/           Man(5) pages
po/                     Translations
shell-completion/       Base directory for auto completion scripts
src/                    Source tree
src/firewall/           Import tree for the sevice and all applications
src/icons/              Icons in the sizes: 16, 22, 24, 32, 48 and scalable
src/tests/              Testsuite

firewalld's People

Contributors

t-woerner avatar erig0 avatar jpopelka avatar mgerstner avatar meggycal avatar sirphuttel avatar vrindle avatar jcpunk avatar jakuje avatar mrjoshuap avatar marcosfrm avatar hos7ein avatar leongold avatar jonjensen avatar a4lg avatar ykgmfq avatar weblate avatar ktdreyer avatar torontomedia avatar yurchor avatar sunilmohanadapa avatar mbiebl avatar lkundrak avatar htaira avatar cardoe avatar da2x avatar danc86 avatar kiorky avatar vadorovsky avatar pes-soft avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.