--whitelist

:~# /usr/bin/blockhosts.py --verbose -whitelist="192.\.*,127.0.0.1"
FATAL ERROR: OptionParser: no such option: -w
:~# /usr/bin/blockhosts.py --verbose --whitelist="192.\.*,127.0.0.1"
FATAL ERROR: OptionParser: no such option: --whitelist
:~# /usr/bin/blockhosts.py --verbose --blacklist="192.\.*,127.0.0.1"
FATAL ERROR: OptionParser: no such option: --blacklist
:~# /usr/bin/blockhosts.py --blacklist="192.168.1.1,192.168.1.2"
FATAL ERROR: OptionParser: no such option: --blacklist

i not know where is the problem..

typo, and what version?

What version are you using? Version 2.1 or later is required. Note that if you are upgrading from an older version, the blockhosts.cfg you may also have to change any local modifications - ALL_REGEXS format has changed.

Do a
blockhosts.py --help

to see if the options are available.

Also: there should be two dashes in front of whitelist, for example --whitelist.

when i run blockhosts.py

when i run blockhosts.py with --help argument i not see --whitelist

i see this on

i see this on blockhosts.py

VERSION="2.0.5"
VERSION_DATE="June 2007"
AUTHOR="Avinash Chopde"
AUTHOR_EMAIL="avinash@acm.org"
URL="http://www.aczoom.com/cms/blockhosts/"

okey i installed new version

okey i installed new version , he have --whitelist

but see this..

/usr/bin/blockhosts.py
Traceback (most recent call last):
File "/usr/bin/blockhosts.py", line 2017, in ?
sys.exit(main())
File "/usr/bin/blockhosts.py", line 1948, in main
dh.set_all_reobjs(config["ALL_REGEXS"], config["enable_rules"])
File "/usr/bin/blockhosts.py", line 1565, in set_all_reobjs
enable_reobj = re.compile(enable_rules)
File "/usr/lib/python2.4/sre.py", line 180, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.4/sre.py", line 227, in _compile
raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis

error in blockhosts.cfg?

The log suggests that the ENABLE_RULES
line is wrong - did you edit /etc/blockhosts.cfg? I noticed a problem in the comment:

#ENABLE_RULES = r'.*).*' # use this to enable all rules
it should be
ENABLE_RULES = r'.*' # use this to enable all rules