Error while initiating named & fail2ban

Discussion in 'Installation/Configuration' started by mayasl, Feb 4, 2014.

  1. mayasl

    mayasl New Member

    Hi!

    I configured my VPS which is running on CentOS 6 x64 with the help of Falco Timme's excellent tutorial.

    Everything was just fine, except 2 errors those I have mentioned below.

    1. When shooting "/etc/init.d/named start" I got the following error.

    "/etc/sysconfig/named: line 5: --: command not found"

    But the service was started.

    My named file seems as follows: (After editing as per Timme's tutorial)

    # BIND named process options
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~
    # Currently, you can use the following options:
    #
    ROOTDIR="/var/named/chroot" -- will run named in a chroot environment.
    # you must set up the chroot environment
    # (install the bind-chroot package) before
    # doing this.
    # NOTE:
    # Those directories are automatically mounted to chroot if they are
    # empty in the ROOTDIR directory. It will simplify maintenance of your
    # chroot environment.
    # - /var/named
    # - /etc/pki/dnssec-keys
    # - /etc/named
    # - /usr/lib64/bind or /usr/lib/bind (architecture dependent)
    #
    # Those files are mounted as well if target file doesn't exist in
    # chroot.
    # - /etc/named.conf
    # - /etc/rndc.conf
    # - /etc/rndc.key
    # - /etc/named.rfc1912.zones
    # - /etc/named.dnssec.keys
    # - /etc/named.iscdlv.key
    #
    # Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
    # line to your /etc/rsyslog.conf file. Otherwise your logging becomes
    # broken when rsyslogd daemon is restarted (due update, for example).
    #
    # OPTIONS="whatever" -- These additional options will be passed to named
    # at startup. Don't add -t here, use ROOTDIR instead.
    #
    # KEYTAB_FILE="/dir/file" -- Specify named service keytab file (for GSS-TSIG)
    #
    # DISABLE_ZONE_CHECKING -- By default, initscript calls named-checkzone
    # utility for every zone to ensure all zones are
    # valid before named starts. If you set this option
    # to 'yes' then initscript doesn't perform those
    # checks.


    2. When shooting "/etc/init.d/fail2ban start" getting an error as follows :

    Starting fail2ban: Traceback (most recent call last):
    File "/usr/bin/fail2ban-client", line 429, in <module>
    if client.start(sys.argv):
    File "/usr/bin/fail2ban-client", line 352, in start
    self.__configurator.readEarly()
    File "/usr/share/fail2ban/client/configurator.py", line 58, in readEarly
    self.__fail2ban.read()
    File "/usr/share/fail2ban/client/fail2banreader.py", line 39, in read
    ConfigReader.read(self, "fail2ban")
    File "/usr/share/fail2ban/client/configreader.py", line 73, in read
    config_files_read = SafeConfigParserWithIncludes.read(self, config_files)
    File "/usr/share/fail2ban/client/configparserinc.py", line 105, in read
    fileNamesFull += SafeConfigParserWithIncludes.getIncludes(filename)
    File "/usr/share/fail2ban/client/configparserinc.py", line 76, in getIncludes
    parser.read(resource)
    File "/usr/lib64/python2.6/ConfigParser.py", line 286, in read
    self._read(fp, filename)
    File "/usr/lib64/python2.6/ConfigParser.py", line 510, in _read
    raise e
    ConfigParser.ParsingError: File contains parsing errors: /etc/fail2ban/fail2ban.
    conf
    [line 34]: 'logtarget - /var/log/fail2ban.log\n'
    [FAILED]


    Can someone please help me to fix these issues?
     

Share This Page