Hi,

I read the bash script and I have a few questions.

Are you sure the openvassd is starting? The bash script is simply
running `openvassd` and I am not completely sure what the default
behaviour is compared to what did work for you. If you want a
workaround, maybe you could change

. /etc/rc.d/init.d/functions

exec="/usr/sbin/openvassd" //change this
prog="openvassd"
progname="openvas-scanner"

to

. /etc/rc.d/init.d/functions

exec="/usr/sbin/openvassd -d 127.0.0.1" //to this
prog="openvassd"
progname="openvas-scanner"

and get the same effect?

What happens if you try to connect in, say, batch mode (openvas-client
-q 127.0.0.1 9390 user pass targets results)?


On Fri, Nov 12, 2010 at 12:34 PM, Brian Clark <bcl...@omeda.com> wrote:
> Same error message when specifying the actual IP address of the system (FYI:
> the system has only one IP address).
>
> -----Original Message-----
> From: openvas-discuss-boun...@wald.intevation.org
> [mailto:openvas-discuss-boun...@wald.intevation.org] On Behalf Of
> Copenhaver, Walter A
> Sent: Friday, November 12, 2010 12:22 PM
> To: Brian Clark; Brandon Perry; openvas-discuss@wald.intevation.org
> Subject: Re: [Openvas-discuss] OpenVAS Client - Cannot connect to localhost
>
> What happens if you use your regular IP address on your client instead of
> "localhost" or the loopback (127.0.0.1) ip?
>
> -----Original Message-----
> From: openvas-discuss-boun...@wald.intevation.org
> [mailto:openvas-discuss-boun...@wald.intevation.org] On Behalf Of Brian
> Clark
> Sent: Friday, November 12, 2010 11:09 AM
> To: Brandon Perry; openvas-discuss@wald.intevation.org
> Subject: Re: [Openvas-discuss] OpenVAS Client - Cannot connect to localhost
>
> I have been starting the server using the init script that came with the RPM
> packages (from Atomic).
>
> Your suggestion worked--when starting openvassd as you suggested, I was able
> to connect just fine.
>
> However, when I stopped the process and started it back up again using the
> Atomic init script, I received the same connection error when trying to
> connect to either localhost or 127.0.0.1.
>
> I have the Atomic init.d startup script copied in below. Any idea why it is
> not starting up openvassd in a way that I can connect to it? Also, I checked
> the openvassd.conf file, and saw nothing in it related to the IP, network
> interface, or even TCP port that openvassd runs on.
>
>
> #!/bin/bash
>
> # This is an implementation of a start-script for OpenVAS Scanner.
>
> # Make RedHat happy:
> #
> # chkconfig: - 91 9
> # Description: OpenVAS is a vulnerability Scanner #
>
> ### BEGIN INIT INFO
> # Provides: openvas-scanner
> # Required-Start: $local_fs $network $syslog # Required-Stop: $local_fs
> $network $syslog # Default-Start:
> # Default-Stop: 0 1 2 3 4 5 6
> # Short-Description: start|stop|status|restart|condrestart|reloadplugins
> OpenVAS Scanner
> # Description: control OpenVAS Scanner
> ### END INIT INFO
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> exec="/usr/sbin/openvassd"
> prog="openvassd"
> progname="openvas-scanner"
> config=/etc/openvas/openvassd.conf
> lockfile=/var/lock/subsys/openvas-scanner
>
> [ -e /etc/sysconfig/$progname ] && . /etc/sysconfig/$progname
>
> rh_status() {
>        # run checks to determine if the service is running or use generic
> status
>        status -p /var/run/$prog.pid -l $lockfile $progname }
>
> rh_status_q() {
>        rh_status >/dev/null 2>&1
> }
>
> start() {
>        grep -q ca_file /etc/openvas/openvassd.conf >& /dev/null
>        if [ $? -ne 0 ]; then
>                echo "No certificate specified in configuration file. Did
> you run openvas-mkcert tool?"
>                exit 6
>        fi
>
>        CACERT=`grep ca_file /etc/openvas/openvassd.conf | cut -d= -f2`
>        if [ \! -z "$CACERT" -a \! -f "$CACERT" ]; then
>                echo "Certificate specified in the configuration file not
> found. Did you run openvas-mkcert tool?"
>                exit 6
>        fi
>
>        echo "Starting $progname:"
>        daemon --pidfile=/var/run/$prog.pid $prog $OPTIONS
>        RETVAL=$?
>        echo
>        [ $RETVAL -eq 0 ] && touch $lockfile
>        return $RETVAL
> }
>
> stop() {
>        echo -n "Stopping $progname: "
>        killproc $prog
>        RETVAL=$?
>        echo
>        [ $RETVAL -eq 0 ] && rm -f $lockfile
>        return $RETVAL
> }
>
> restart() {
>        stop
>        start
> }
>
> reloadplugins() {
>        echo -n "Reloading OpenVAS plugins: "
>        killproc $prog -HUP
>        echo
> }
>
> case "$1" in
>        start)
>                rh_status_q && exit 0
>                $1
>                ;;
>
>        stop)
>                rh_status_q || exit 0
>                $1
>                ;;
>
>        restart)
>                $1
>                ;;
>
>        condrestart|try-restart)
>                rh_status_q || exit 0
>                $1
>                ;;
>
>        reload)
>                ;;
>
>        reloadplugins)
>                rh_status_q || exit 0
>                $1
>                ;;
>
>        status)
>                status -p /var/run/$prog.pid -l $lockfile $progname
>                ;;
>
>        *)
>                echo "Usage: $0
> {start|stop|status|restart|condrestart|reload|reloadplugins}"
>                exit 1
> esac
>
> exit 0
>
>
>
> -----Original Message-----
> From: Brandon Perry [mailto:bperry.volat...@gmail.com]
> Sent: Friday, November 12, 2010 11:08 AM
> To: Brian Clark
> Cc: openvas-discuss@wald.intevation.org
> Subject: Re: [Openvas-discuss] OpenVAS Client - Cannot connect to localhost
>
> How did you start the server?
>
> What happens if you use `openvassd -a 127.0.0.1` and using 127.0.0.1 as the
> IP to connect to?
>
> On Fri, Nov 12, 2010 at 11:10 AM, Brian Clark <bcl...@omeda.com> wrote:
>> Hello,
>>
>>
>>
>> I am new to OpenVAS and am trying to get my first installation up and
>> running. I have gone through the Compendium and followed the setup
>> instructions. Now, when I try to connect to my OpenVAS server from the
>> OpenVAS-Client, I get an error that I cannot connect to localhost.
>>   "OpenVAS-Client:  Could not open a connection to localhost."
>>
>>
>>
>> I am running the client on the same system as the server. I checked,
>> and I do have openvassd and openvasad running.
>>
>> root     19513     1  0 10:33 ?        00:00:00 openvassd: waiting for
>> incoming connections
>>
>> root     19666     1  0 10:37 ?        00:00:00 openvasad
>>
>>
>>
>> I am trying to connect using TCP port 9390 (the default). I turned off
>> the CentOS built-in firewall.
>>
>>
>>
>> This is a brand new installation of CentOS 5.5 x64, and I installed
>> OpenVAS from the most recent packages available in the Atomic repository.
>>
>>
>>
>> What am I doing wrong?
>>
>>
>>
>> Thanks,
>>
>> Brian
>>
>> _______________________________________________
>> Openvas-discuss mailing list
>> Openvas-discuss@wald.intevation.org
>> http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
>>
>>
>
>
>
> --
> http://volatile-minds.blogspot.com -- blog http://www.volatileminds.net --
> website _______________________________________________
> Openvas-discuss mailing list
> Openvas-discuss@wald.intevation.org
> http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
>
> _______________________________________________
> Openvas-discuss mailing list
> Openvas-discuss@wald.intevation.org
> http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
>
>



-- 
http://volatile-minds.blogspot.com -- blog
http://www.volatileminds.net -- website
_______________________________________________
Openvas-discuss mailing list
Openvas-discuss@wald.intevation.org
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss

Reply via email to