0

I am familiar with debian,so i want to build my vps server with debian instead of centos. There are log file /var/log/firewalld both in centos and debian.
In order to activate log function for firewall,it is simple to add below line into /etc/sysconfig/firewalld in centos

FIREWALLD_ARGS=--debug=10

and restart the service with sudo systemctl restart firewalld.

I found that there is no directory /etc/sysconfig ,shall i create directory and file in my debian?

mkdir  /etc/sysconfig
touch   /etc/sysconfig/firewalld

And do as in centos,it is the standard way to set firewalld'log in debian?

scrapy
  • 337
  • 4
  • 17

1 Answers1

1

The /etc/sysconfig/ is a configuration file directory you could find in Red Hat based distributions like RHEL 7 and older Fedora, but not in Debian based distributions. Do not create the directory; nothing will read your configuration from there! The same has also been said in the Firewalld documentation for HowTo: Debud firewalld:

The sysconfig file

This file exists in Fedora and RHEL based distributions, but may not in others.

# firewalld command line args
# possible values: --debug 
FIREWALLD_ARGS= 

To enable the debugging mode, add --debug[=<level>] to FIREWALLD_ARGS. For a list of the supported debug levels, please have a look further down.

The "further down" has two options:

  1. The firewalld systemd service file,
    having the command line arguments in the line beginning with

    ExecStart=/usr/sbin/firewalld
    

    In Debian, the path might be /etc/systemd/system/firewalld.service.

  2. Start in terminal
    as root with # firewalld --nofork --debug=10.

    With the --nofork option the daemon is not doing a fork and stays in the foreground.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129