Reply to comment

Problems with running BlockHosts

I tried installing python from an rpm I found in a repository and got a bunch of failed dependencies. I then tried to build it from the source and phython seemed to install just fine.

I then proceeded to install BlockHosts and modified the blockhosts.cfg file.

HOSTS_BLOCKFILE = "/etc/hosts.allow"
# the name of the block-file on your computer - usually hosts.allow or
# hosts.deny, see "man 5 hosts_access" for details on these files.
# default is hosts.allow

HOST_BLOCKLINE = ["ALL: ", " : deny"]
# the line to output, with Host Ip Address in between the strings above,
# to turn on blocking of that IP address. Must have 2 strings in list.

COUNT_THRESHOLD = 3
# number of invalid attempts after which host is blocked
# note that actual denial make take one or more attempts - depends on the
# timing of when LOGFILES are updated by the system, and when this script
# gets to run

LOGFILES = [ "/var/log/secure", ]

Saved the file and attempted to run blockhosts with blockhosts.py --verbose

I get the following in the console:

blockhosts 2.1.2 started: 2009-01-17 02:36:56 EST
... load blockfile: /etc/hosts.allow
ERROR: Failed to load blockfile - block-file marker error
Expected two marker lines in the file, somewhere in the middle of the file:
#---- BlockHosts Additions
#---- BlockHosts Additions

Traceback (most recent call last):
File "/usr/bin/blockhosts.py", line 1910, in ?
sys.exit(main())
File "/usr/bin/blockhosts.py", line 1818, in main
dh.load_hosts_blockfile(prev_logoffsets)
File "/usr/bin/blockhosts.py", line 1275, in load_hosts_blockfile
raise MissingMarkerError
__main__.MissingMarkerError

Is there anything I'm missing?

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <b> <span> <pre> <hr>
  • Lines and paragraphs break automatically.
  • You may use [acidfree:xx] tags to display acidfree videos or images inline.
  • [l:URL text] input tags replaced with HTML links. URL may be Drupal internal path. [ Link Filter Tips ]

More information about formatting options