I am trying to pass the IP address of the remote host to a shell script
out of xinetd on the telnet port. I have tried the following:

        # /etc/hosts.allow
        ALL: ALL: setenv VIRTUAL_IP_ADDR %A

        # 
        service telnet
        {
                disable = no
                flags           = REUSE
                socket_type     = stream        
                wait            = no
                user            = root
                passenv         = VIRTUAL_IP_ADDR
                server          = /usr/local/bin/foo.sh
                log_type        = SYSLOG daemon notice
                log_on_success  = PID EXIT DURATION
                log_on_failure  = PID
        }

The problem isthat the variable isn't being passed to foo. The only way
I've gotten this to work is to replace login with foo with telnet itself
(i.e. in.telnetd -L /usr/local/bin/foo). Telnet seems to place this
information into the environment as REMOTEHOST (where is this
documented?!) , but performs VERY slowly.

Any suggestions on how to pass the remote IP address more directly?

-- 
Todd A. Jacobs
Senior Network Consultant



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to